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