Sun, 18 May 2014 14:13:09 +0200
Corrected a bunch of source docu issues.
<!DOCTYPE html> <html><head> <title>eric5.Utilities.ClassBrowsers.pyclbr</title> <meta charset="UTF-8"> <style> body { background: #EDECE6; margin: 0em 1em 10em 1em; color: black; } h1 { color: white; background: #85774A; } h2 { color: white; background: #85774A; } h3 { color: white; background: #9D936E; } h4 { color: white; background: #9D936E; } a { color: #BA6D36; } </style> </head> <body><a NAME="top" ID="top"></a> <h1>eric5.Utilities.ClassBrowsers.pyclbr</h1> <p> Parse a Python file and retrieve classes, functions/methods and attributes. </p><p> Parse enough of a Python file to recognize class and method definitions and to find out the superclasses of a class as well as its attributes. </p><p> This is module is based on pyclbr found in the Python 2.2.2 distribution. </p> <h3>Global Attributes</h3> <table> <tr><td>SUPPORTED_TYPES</td></tr><tr><td>TABWIDTH</td></tr><tr><td>_commentsub</td></tr><tr><td>_getnext</td></tr><tr><td>_modules</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#Attribute">Attribute</a></td> <td>Class to represent a class attribute.</td> </tr><tr> <td><a href="#Class">Class</a></td> <td>Class to represent a Python class.</td> </tr><tr> <td><a href="#Function">Function</a></td> <td>Class to represent a Python function.</td> </tr><tr> <td><a href="#Publics">Publics</a></td> <td>Class to represent the list of public identifiers.</td> </tr><tr> <td><a href="#VisibilityMixin">VisibilityMixin</a></td> <td>Mixin class implementing the notion of visibility.</td> </tr> </table> <h3>Functions</h3> <table> <tr> <td><a href="#_indent">_indent</a></td> <td>Module function to return the indentation depth.</td> </tr><tr> <td><a href="#readmodule_ex">readmodule_ex</a></td> <td>Read a module file and return a dictionary of classes.</td> </tr> </table> <hr /><hr /> <a NAME="Attribute" ID="Attribute"></a> <h2>Attribute</h2> <p> Class to represent a class attribute. </p> <h3>Derived from</h3> ClbrBaseClasses.Attribute, VisibilityMixin <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#Attribute.__init__">Attribute</a></td> <td>Constructor</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="Attribute.__init__" ID="Attribute.__init__"></a> <h4>Attribute (Constructor)</h4> <b>Attribute</b>(<i>module, name, file, lineno</i>) <p> Constructor </p><dl> <dt><i>module</i></dt> <dd> name of the module containing this class </dd><dt><i>name</i></dt> <dd> name of this class </dd><dt><i>file</i></dt> <dd> filename containing this attribute </dd><dt><i>lineno</i></dt> <dd> linenumber of the class definition </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="Class" ID="Class"></a> <h2>Class</h2> <p> Class to represent a Python class. </p> <h3>Derived from</h3> ClbrBaseClasses.Class, VisibilityMixin <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#Class.__init__">Class</a></td> <td>Constructor</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="Class.__init__" ID="Class.__init__"></a> <h4>Class (Constructor)</h4> <b>Class</b>(<i>module, name, super, file, lineno</i>) <p> Constructor </p><dl> <dt><i>module</i></dt> <dd> name of the module containing this class </dd><dt><i>name</i></dt> <dd> name of this class </dd><dt><i>super</i></dt> <dd> list of class names this class is inherited from </dd><dt><i>file</i></dt> <dd> filename containing this class </dd><dt><i>lineno</i></dt> <dd> linenumber of the class definition </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="Function" ID="Function"></a> <h2>Function</h2> <p> Class to represent a Python function. </p> <h3>Derived from</h3> ClbrBaseClasses.Function, VisibilityMixin <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#Function.__init__">Function</a></td> <td>Constructor</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="Function.__init__" ID="Function.__init__"></a> <h4>Function (Constructor)</h4> <b>Function</b>(<i>module, name, file, lineno, signature='', separator=', ', modifierType=ClbrBaseClasses.Function.General</i>) <p> Constructor </p><dl> <dt><i>module</i></dt> <dd> name of the module containing this function </dd><dt><i>name</i></dt> <dd> name of this function </dd><dt><i>file</i></dt> <dd> filename containing this class </dd><dt><i>lineno</i></dt> <dd> linenumber of the class definition </dd><dt><i>signature</i></dt> <dd> parameterlist of the method </dd><dt><i>separator</i></dt> <dd> string separating the parameters </dd><dt><i>modifierType</i></dt> <dd> type of the function </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="Publics" ID="Publics"></a> <h2>Publics</h2> <p> Class to represent the list of public identifiers. </p> <h3>Derived from</h3> object <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#Publics.__init__">Publics</a></td> <td>Constructor</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="Publics.__init__" ID="Publics.__init__"></a> <h4>Publics (Constructor)</h4> <b>Publics</b>(<i>module, file, lineno, idents</i>) <p> Constructor </p><dl> <dt><i>module</i></dt> <dd> name of the module containing this function </dd><dt><i>file</i></dt> <dd> filename containing this class </dd><dt><i>lineno</i></dt> <dd> linenumber of the class definition </dd><dt><i>idents</i></dt> <dd> list of public identifiers </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="VisibilityMixin" ID="VisibilityMixin"></a> <h2>VisibilityMixin</h2> <p> Mixin class implementing the notion of visibility. </p> <h3>Derived from</h3> ClbrBaseClasses.ClbrVisibilityMixinBase <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#VisibilityMixin.__init__">VisibilityMixin</a></td> <td>Constructor</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="VisibilityMixin.__init__" ID="VisibilityMixin.__init__"></a> <h4>VisibilityMixin (Constructor)</h4> <b>VisibilityMixin</b>(<i></i>) <p> Constructor </p> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="_indent" ID="_indent"></a> <h2>_indent</h2> <b>_indent</b>(<i>ws</i>) <p> Module function to return the indentation depth. </p><dl> <dt><i>ws</i></dt> <dd> the whitespace to be checked (string) </dd> </dl><dl> <dt>Returns:</dt> <dd> length of the whitespace string (integer) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="readmodule_ex" ID="readmodule_ex"></a> <h2>readmodule_ex</h2> <b>readmodule_ex</b>(<i>module, path=[], inpackage=False, isPyFile=False</i>) <p> Read a module file and return a dictionary of classes. </p><p> Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. </p><dl> <dt><i>module</i></dt> <dd> name of the module file (string) </dd><dt><i>path</i></dt> <dd> path the module should be searched in (list of strings) </dd><dt><i>inpackage</i></dt> <dd> flag indicating a module inside a package is scanned </dd><dt><i>isPyFile</i></dt> <dd> flag indicating a Python file (boolean) </dd> </dl><dl> <dt>Returns:</dt> <dd> the resulting dictionary </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>