55 lines
3.9 KiB
HTML
55 lines
3.9 KiB
HTML
|
|
||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<html><head><title>Python: module telemetry.core.discover</title>
|
||
|
</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 (c) 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="fnmatch.html">fnmatch</a><br>
|
||
|
</td><td width="25%" valign=top><a href="inspect.html">inspect</a><br>
|
||
|
</td><td width="25%" valign=top><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>(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>
|
||
|
<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>
|
||
|
<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>(start_dir, top_level_dir, pattern<font color="#909090">='*'</font>)</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>
|