1 2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3<html><head><title>Python: module telemetry.core.discover</title> 4<meta charset="utf-8"> 5</head><body bgcolor="#f0f0f8"> 6 7<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 8<tr bgcolor="#7799ee"> 9<td valign=bottom> <br> 10<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 11><td align=right valign=bottom 12><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> 13 <p><tt># Copyright 2012 The Chromium Authors. All rights reserved.<br> 14# Use of this source code is governed by a BSD-style license that can be<br> 15# found in the LICENSE file.</tt></p> 16<p> 17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 18<tr bgcolor="#aa55cc"> 19<td colspan=3 valign=bottom> <br> 20<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 21 22<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 23<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> 24<a href="telemetry.internal.util.classes.html">telemetry.internal.util.classes</a><br> 25</td><td width="25%" valign=top><a href="telemetry.decorators.html">telemetry.decorators</a><br> 26<a href="fnmatch.html">fnmatch</a><br> 27</td><td width="25%" valign=top><a href="inspect.html">inspect</a><br> 28<a href="os.html">os</a><br> 29</td><td width="25%" valign=top><a href="re.html">re</a><br> 30</td></tr></table></td></tr></table><p> 31<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 32<tr bgcolor="#eeaa77"> 33<td colspan=3 valign=bottom> <br> 34<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> 35 36<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> 37<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> 38 <br> 39Base classes that contain subclasses are ignored by default.<br> 40 <br> 41Args:<br> 42 start_dir: The directory to recursively search.<br> 43 top_level_dir: The top level of the package, for importing.<br> 44 base_class: The base class to search for.<br> 45 pattern: Unix shell-style pattern for filtering the filenames to import.<br> 46 index_by_class_name: If True, use class name converted to<br> 47 lowercase_with_underscores instead of module name in return dict keys.<br> 48 directly_constructable: If True, will only return classes that can be<br> 49 constructed without arguments<br> 50 <br> 51Returns:<br> 52 dict of {module_name: class} or {underscored_class_name: class}</tt></dd></dl> 53 <dl><dt><a name="-DiscoverClassesInModule"><strong>DiscoverClassesInModule</strong></a>(*args, **kwargs)</dt><dd><tt>Discover all classes in |module| which subclass |base_class|.<br> 54 <br> 55Base classes that contain subclasses are ignored by default.<br> 56 <br> 57Args:<br> 58 module: The module to search.<br> 59 base_class: The base class to search for.<br> 60 index_by_class_name: If True, use class name converted to<br> 61 lowercase_with_underscores instead of module name in return dict keys.<br> 62 <br> 63Returns:<br> 64 dict of {module_name: class} or {underscored_class_name: class}</tt></dd></dl> 65 <dl><dt><a name="-DiscoverModules"><strong>DiscoverModules</strong></a>(*args, **kwargs)</dt><dd><tt>Discover all modules in |start_dir| which match |pattern|.<br> 66 <br> 67Args:<br> 68 start_dir: The directory to recursively search.<br> 69 top_level_dir: The top level of the package, for importing.<br> 70 pattern: Unix shell-style pattern for filtering the filenames to import.<br> 71 <br> 72Returns:<br> 73 list of modules.</tt></dd></dl> 74</td></tr></table> 75</body></html>