<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><title>Python: module telemetry.core.discover</title> <meta charset="utf-8"> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.core.html"><font color="#ffffff">core</font></a>.discover</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/discover.py">telemetry/core/discover.py</a></font></td></tr></table> <p><tt># Copyright 2012 The Chromium Authors. All rights reserved.<br> # Use of this source code is governed by a BSD-style license that can be<br> # found in the LICENSE file.</tt></p> <p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#aa55cc"> <td colspan=3 valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.internal.util.camel_case.html">telemetry.internal.util.camel_case</a><br> <a href="telemetry.internal.util.classes.html">telemetry.internal.util.classes</a><br> </td><td width="25%" valign=top><a href="telemetry.decorators.html">telemetry.decorators</a><br> <a href="fnmatch.html">fnmatch</a><br> </td><td width="25%" valign=top><a href="inspect.html">inspect</a><br> <a href="os.html">os</a><br> </td><td width="25%" valign=top><a href="re.html">re</a><br> </td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#eeaa77"> <td colspan=3 valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> <td width="100%"><dl><dt><a name="-DiscoverClasses"><strong>DiscoverClasses</strong></a>(*args, **kwargs)</dt><dd><tt>Discover all classes in |start_dir| which subclass |base_class|.<br> <br> Base classes that contain subclasses are ignored by default.<br> <br> Args:<br> start_dir: The directory to recursively search.<br> top_level_dir: The top level of the package, for importing.<br> base_class: The base class to search for.<br> pattern: Unix shell-style pattern for filtering the filenames to import.<br> index_by_class_name: If True, use class name converted to<br> lowercase_with_underscores instead of module name in return dict keys.<br> directly_constructable: If True, will only return classes that can be<br> constructed without arguments<br> <br> Returns:<br> dict of {module_name: class} or {underscored_class_name: class}</tt></dd></dl> <dl><dt><a name="-DiscoverClassesInModule"><strong>DiscoverClassesInModule</strong></a>(*args, **kwargs)</dt><dd><tt>Discover all classes in |module| which subclass |base_class|.<br> <br> Base classes that contain subclasses are ignored by default.<br> <br> Args:<br> module: The module to search.<br> base_class: The base class to search for.<br> index_by_class_name: If True, use class name converted to<br> lowercase_with_underscores instead of module name in return dict keys.<br> <br> Returns:<br> dict of {module_name: class} or {underscored_class_name: class}</tt></dd></dl> <dl><dt><a name="-DiscoverModules"><strong>DiscoverModules</strong></a>(*args, **kwargs)</dt><dd><tt>Discover all modules in |start_dir| which match |pattern|.<br> <br> Args:<br> start_dir: The directory to recursively search.<br> top_level_dir: The top level of the package, for importing.<br> pattern: Unix shell-style pattern for filtering the filenames to import.<br> <br> Returns:<br> list of modules.</tt></dd></dl> </td></tr></table> </body></html>