eric6/Documentation/Source/eric6.Utilities.ClassBrowsers.pyclbr.html

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7641
21ea4fd50b0a
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.Utilities.ClassBrowsers.pyclbr</h1> 23 <h1>eric6.Utilities.ClassBrowsers.pyclbr</h1>
24
23 <p> 25 <p>
24 Parse a Python file and retrieve classes, functions/methods and attributes. 26 Parse a Python file and retrieve classes, functions/methods and attributes.
25 </p><p> 27 </p>
28 <p>
26 Parse enough of a Python file to recognize class and method definitions and 29 Parse enough of a Python file to recognize class and method definitions and
27 to find out the superclasses of a class as well as its attributes. 30 to find out the superclasses of a class as well as its attributes.
28 </p><p> 31 </p>
32 <p>
29 This is module is based on pyclbr found in the Python 2.2.2 distribution. 33 This is module is based on pyclbr found in the Python 2.2.2 distribution.
30 </p> 34 </p>
31 <h3>Global Attributes</h3> 35 <h3>Global Attributes</h3>
36
32 <table> 37 <table>
33 <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> 38 <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>
34 </table> 39 </table>
35 <h3>Classes</h3> 40 <h3>Classes</h3>
36 <table> 41
42 <table>
43
37 <tr> 44 <tr>
38 <td><a href="#Attribute">Attribute</a></td> 45 <td><a href="#Attribute">Attribute</a></td>
39 <td>Class to represent a class attribute.</td> 46 <td>Class to represent a class attribute.</td>
40 </tr><tr> 47 </tr>
48 <tr>
41 <td><a href="#Class">Class</a></td> 49 <td><a href="#Class">Class</a></td>
42 <td>Class to represent a Python class.</td> 50 <td>Class to represent a Python class.</td>
43 </tr><tr> 51 </tr>
52 <tr>
44 <td><a href="#Function">Function</a></td> 53 <td><a href="#Function">Function</a></td>
45 <td>Class to represent a Python function.</td> 54 <td>Class to represent a Python function.</td>
46 </tr><tr> 55 </tr>
56 <tr>
47 <td><a href="#ImportedModule">ImportedModule</a></td> 57 <td><a href="#ImportedModule">ImportedModule</a></td>
48 <td>Class to represent an imported module.</td> 58 <td>Class to represent an imported module.</td>
49 </tr><tr> 59 </tr>
60 <tr>
50 <td><a href="#Imports">Imports</a></td> 61 <td><a href="#Imports">Imports</a></td>
51 <td>Class to represent the list of imported modules.</td> 62 <td>Class to represent the list of imported modules.</td>
52 </tr><tr> 63 </tr>
64 <tr>
53 <td><a href="#Publics">Publics</a></td> 65 <td><a href="#Publics">Publics</a></td>
54 <td>Class to represent the list of public identifiers.</td> 66 <td>Class to represent the list of public identifiers.</td>
55 </tr><tr> 67 </tr>
68 <tr>
56 <td><a href="#VisibilityMixin">VisibilityMixin</a></td> 69 <td><a href="#VisibilityMixin">VisibilityMixin</a></td>
57 <td>Mixin class implementing the notion of visibility.</td> 70 <td>Mixin class implementing the notion of visibility.</td>
58 </tr> 71 </tr>
59 </table> 72 </table>
60 <h3>Functions</h3> 73 <h3>Functions</h3>
61 <table> 74
75 <table>
76
62 <tr> 77 <tr>
63 <td><a href="#_indent">_indent</a></td> 78 <td><a href="#_indent">_indent</a></td>
64 <td>Module function to return the indentation depth.</td> 79 <td>Module function to return the indentation depth.</td>
65 </tr><tr> 80 </tr>
81 <tr>
66 <td><a href="#readmodule_ex">readmodule_ex</a></td> 82 <td><a href="#readmodule_ex">readmodule_ex</a></td>
67 <td>Read a module file and return a dictionary of classes.</td> 83 <td>Read a module file and return a dictionary of classes.</td>
68 </tr> 84 </tr>
69 </table> 85 </table>
70 <hr /><hr /> 86 <hr />
87 <hr />
71 <a NAME="Attribute" ID="Attribute"></a> 88 <a NAME="Attribute" ID="Attribute"></a>
72 <h2>Attribute</h2> 89 <h2>Attribute</h2>
90
73 <p> 91 <p>
74 Class to represent a class attribute. 92 Class to represent a class attribute.
75 </p> 93 </p>
76 <h3>Derived from</h3> 94 <h3>Derived from</h3>
77 ClbrBaseClasses.Attribute, VisibilityMixin 95 ClbrBaseClasses.Attribute, VisibilityMixin
78 <h3>Class Attributes</h3> 96 <h3>Class Attributes</h3>
97
79 <table> 98 <table>
80 <tr><td>None</td></tr> 99 <tr><td>None</td></tr>
81 </table> 100 </table>
82 <h3>Class Methods</h3> 101 <h3>Class Methods</h3>
102
83 <table> 103 <table>
84 <tr><td>None</td></tr> 104 <tr><td>None</td></tr>
85 </table> 105 </table>
86 <h3>Methods</h3> 106 <h3>Methods</h3>
87 <table> 107
108 <table>
109
88 <tr> 110 <tr>
89 <td><a href="#Attribute.__init__">Attribute</a></td> 111 <td><a href="#Attribute.__init__">Attribute</a></td>
90 <td>Constructor</td> 112 <td>Constructor</td>
91 </tr> 113 </tr>
92 </table> 114 </table>
93 <h3>Static Methods</h3> 115 <h3>Static Methods</h3>
94 <table> 116
95 <tr><td>None</td></tr> 117 <table>
96 </table> 118 <tr><td>None</td></tr>
119 </table>
120
97 <a NAME="Attribute.__init__" ID="Attribute.__init__"></a> 121 <a NAME="Attribute.__init__" ID="Attribute.__init__"></a>
98 <h4>Attribute (Constructor)</h4> 122 <h4>Attribute (Constructor)</h4>
99 <b>Attribute</b>(<i>module, name, file, lineno</i>) 123 <b>Attribute</b>(<i>module, name, file, lineno</i>)
124
100 <p> 125 <p>
101 Constructor 126 Constructor
102 </p><dl> 127 </p>
128 <dl>
129
103 <dt><i>module</i></dt> 130 <dt><i>module</i></dt>
104 <dd> 131 <dd>
105 name of the module containing this class 132 name of the module containing this class
106 </dd><dt><i>name</i></dt> 133 </dd>
134 <dt><i>name</i></dt>
107 <dd> 135 <dd>
108 name of this class 136 name of this class
109 </dd><dt><i>file</i></dt> 137 </dd>
138 <dt><i>file</i></dt>
110 <dd> 139 <dd>
111 filename containing this attribute 140 filename containing this attribute
112 </dd><dt><i>lineno</i></dt> 141 </dd>
142 <dt><i>lineno</i></dt>
113 <dd> 143 <dd>
114 linenumber of the class definition 144 linenumber of the class definition
115 </dd> 145 </dd>
116 </dl> 146 </dl>
117 <div align="right"><a href="#top">Up</a></div> 147 <div align="right"><a href="#top">Up</a></div>
118 <hr /><hr /> 148 <hr />
149 <hr />
119 <a NAME="Class" ID="Class"></a> 150 <a NAME="Class" ID="Class"></a>
120 <h2>Class</h2> 151 <h2>Class</h2>
152
121 <p> 153 <p>
122 Class to represent a Python class. 154 Class to represent a Python class.
123 </p> 155 </p>
124 <h3>Derived from</h3> 156 <h3>Derived from</h3>
125 ClbrBaseClasses.Class, VisibilityMixin 157 ClbrBaseClasses.Class, VisibilityMixin
126 <h3>Class Attributes</h3> 158 <h3>Class Attributes</h3>
159
127 <table> 160 <table>
128 <tr><td>None</td></tr> 161 <tr><td>None</td></tr>
129 </table> 162 </table>
130 <h3>Class Methods</h3> 163 <h3>Class Methods</h3>
164
131 <table> 165 <table>
132 <tr><td>None</td></tr> 166 <tr><td>None</td></tr>
133 </table> 167 </table>
134 <h3>Methods</h3> 168 <h3>Methods</h3>
135 <table> 169
170 <table>
171
136 <tr> 172 <tr>
137 <td><a href="#Class.__init__">Class</a></td> 173 <td><a href="#Class.__init__">Class</a></td>
138 <td>Constructor</td> 174 <td>Constructor</td>
139 </tr> 175 </tr>
140 </table> 176 </table>
141 <h3>Static Methods</h3> 177 <h3>Static Methods</h3>
142 <table> 178
143 <tr><td>None</td></tr> 179 <table>
144 </table> 180 <tr><td>None</td></tr>
181 </table>
182
145 <a NAME="Class.__init__" ID="Class.__init__"></a> 183 <a NAME="Class.__init__" ID="Class.__init__"></a>
146 <h4>Class (Constructor)</h4> 184 <h4>Class (Constructor)</h4>
147 <b>Class</b>(<i>module, name, superClasses, file, lineno</i>) 185 <b>Class</b>(<i>module, name, superClasses, file, lineno</i>)
186
148 <p> 187 <p>
149 Constructor 188 Constructor
150 </p><dl> 189 </p>
190 <dl>
191
151 <dt><i>module</i></dt> 192 <dt><i>module</i></dt>
152 <dd> 193 <dd>
153 name of the module containing this class 194 name of the module containing this class
154 </dd><dt><i>name</i></dt> 195 </dd>
196 <dt><i>name</i></dt>
155 <dd> 197 <dd>
156 name of this class 198 name of this class
157 </dd><dt><i>superClasses</i></dt> 199 </dd>
200 <dt><i>superClasses</i></dt>
158 <dd> 201 <dd>
159 list of class names this class is inherited from 202 list of class names this class is inherited from
160 </dd><dt><i>file</i></dt> 203 </dd>
204 <dt><i>file</i></dt>
161 <dd> 205 <dd>
162 filename containing this class 206 filename containing this class
163 </dd><dt><i>lineno</i></dt> 207 </dd>
208 <dt><i>lineno</i></dt>
164 <dd> 209 <dd>
165 linenumber of the class definition 210 linenumber of the class definition
166 </dd> 211 </dd>
167 </dl> 212 </dl>
168 <div align="right"><a href="#top">Up</a></div> 213 <div align="right"><a href="#top">Up</a></div>
169 <hr /><hr /> 214 <hr />
215 <hr />
170 <a NAME="Function" ID="Function"></a> 216 <a NAME="Function" ID="Function"></a>
171 <h2>Function</h2> 217 <h2>Function</h2>
218
172 <p> 219 <p>
173 Class to represent a Python function. 220 Class to represent a Python function.
174 </p> 221 </p>
175 <h3>Derived from</h3> 222 <h3>Derived from</h3>
176 ClbrBaseClasses.Function, VisibilityMixin 223 ClbrBaseClasses.Function, VisibilityMixin
177 <h3>Class Attributes</h3> 224 <h3>Class Attributes</h3>
225
178 <table> 226 <table>
179 <tr><td>None</td></tr> 227 <tr><td>None</td></tr>
180 </table> 228 </table>
181 <h3>Class Methods</h3> 229 <h3>Class Methods</h3>
230
182 <table> 231 <table>
183 <tr><td>None</td></tr> 232 <tr><td>None</td></tr>
184 </table> 233 </table>
185 <h3>Methods</h3> 234 <h3>Methods</h3>
186 <table> 235
236 <table>
237
187 <tr> 238 <tr>
188 <td><a href="#Function.__init__">Function</a></td> 239 <td><a href="#Function.__init__">Function</a></td>
189 <td>Constructor</td> 240 <td>Constructor</td>
190 </tr> 241 </tr>
191 </table> 242 </table>
192 <h3>Static Methods</h3> 243 <h3>Static Methods</h3>
193 <table> 244
194 <tr><td>None</td></tr> 245 <table>
195 </table> 246 <tr><td>None</td></tr>
247 </table>
248
196 <a NAME="Function.__init__" ID="Function.__init__"></a> 249 <a NAME="Function.__init__" ID="Function.__init__"></a>
197 <h4>Function (Constructor)</h4> 250 <h4>Function (Constructor)</h4>
198 <b>Function</b>(<i>module, name, file, lineno, signature='', separator=', ', modifierType=ClbrBaseClasses.Function.General, annotation=""</i>) 251 <b>Function</b>(<i>module, name, file, lineno, signature='', separator=', ', modifierType=ClbrBaseClasses.Function.General, annotation=""</i>)
252
199 <p> 253 <p>
200 Constructor 254 Constructor
201 </p><dl> 255 </p>
256 <dl>
257
202 <dt><i>module</i></dt> 258 <dt><i>module</i></dt>
203 <dd> 259 <dd>
204 name of the module containing this function 260 name of the module containing this function
205 </dd><dt><i>name</i></dt> 261 </dd>
262 <dt><i>name</i></dt>
206 <dd> 263 <dd>
207 name of this function 264 name of this function
208 </dd><dt><i>file</i></dt> 265 </dd>
266 <dt><i>file</i></dt>
209 <dd> 267 <dd>
210 filename containing this class 268 filename containing this class
211 </dd><dt><i>lineno</i></dt> 269 </dd>
270 <dt><i>lineno</i></dt>
212 <dd> 271 <dd>
213 linenumber of the class definition 272 linenumber of the class definition
214 </dd><dt><i>signature</i></dt> 273 </dd>
274 <dt><i>signature</i></dt>
215 <dd> 275 <dd>
216 parameterlist of the method 276 parameterlist of the method
217 </dd><dt><i>separator</i></dt> 277 </dd>
278 <dt><i>separator</i></dt>
218 <dd> 279 <dd>
219 string separating the parameters 280 string separating the parameters
220 </dd><dt><i>modifierType</i></dt> 281 </dd>
282 <dt><i>modifierType</i></dt>
221 <dd> 283 <dd>
222 type of the function 284 type of the function
223 </dd><dt><i>annotation</i></dt> 285 </dd>
286 <dt><i>annotation</i></dt>
224 <dd> 287 <dd>
225 return annotation 288 return annotation
226 </dd> 289 </dd>
227 </dl> 290 </dl>
228 <div align="right"><a href="#top">Up</a></div> 291 <div align="right"><a href="#top">Up</a></div>
229 <hr /><hr /> 292 <hr />
293 <hr />
230 <a NAME="ImportedModule" ID="ImportedModule"></a> 294 <a NAME="ImportedModule" ID="ImportedModule"></a>
231 <h2>ImportedModule</h2> 295 <h2>ImportedModule</h2>
296
232 <p> 297 <p>
233 Class to represent an imported module. 298 Class to represent an imported module.
234 </p> 299 </p>
235 <h3>Derived from</h3> 300 <h3>Derived from</h3>
236 object 301 object
237 <h3>Class Attributes</h3> 302 <h3>Class Attributes</h3>
303
238 <table> 304 <table>
239 <tr><td>None</td></tr> 305 <tr><td>None</td></tr>
240 </table> 306 </table>
241 <h3>Class Methods</h3> 307 <h3>Class Methods</h3>
308
242 <table> 309 <table>
243 <tr><td>None</td></tr> 310 <tr><td>None</td></tr>
244 </table> 311 </table>
245 <h3>Methods</h3> 312 <h3>Methods</h3>
246 <table> 313
314 <table>
315
247 <tr> 316 <tr>
248 <td><a href="#ImportedModule.__init__">ImportedModule</a></td> 317 <td><a href="#ImportedModule.__init__">ImportedModule</a></td>
249 <td>Constructor</td> 318 <td>Constructor</td>
250 </tr><tr> 319 </tr>
320 <tr>
251 <td><a href="#ImportedModule.addImport">addImport</a></td> 321 <td><a href="#ImportedModule.addImport">addImport</a></td>
252 <td>Public method to add a list of imported names.</td> 322 <td>Public method to add a list of imported names.</td>
253 </tr> 323 </tr>
254 </table> 324 </table>
255 <h3>Static Methods</h3> 325 <h3>Static Methods</h3>
256 <table> 326
257 <tr><td>None</td></tr> 327 <table>
258 </table> 328 <tr><td>None</td></tr>
329 </table>
330
259 <a NAME="ImportedModule.__init__" ID="ImportedModule.__init__"></a> 331 <a NAME="ImportedModule.__init__" ID="ImportedModule.__init__"></a>
260 <h4>ImportedModule (Constructor)</h4> 332 <h4>ImportedModule (Constructor)</h4>
261 <b>ImportedModule</b>(<i>module, file, importedModule</i>) 333 <b>ImportedModule</b>(<i>module, file, importedModule</i>)
334
262 <p> 335 <p>
263 Constructor 336 Constructor
264 </p><dl> 337 </p>
338 <dl>
339
265 <dt><i>module</i></dt> 340 <dt><i>module</i></dt>
266 <dd> 341 <dd>
267 name of the module containing the import (string) 342 name of the module containing the import (string)
268 </dd><dt><i>file</i></dt> 343 </dd>
344 <dt><i>file</i></dt>
269 <dd> 345 <dd>
270 file name containing the import (string) 346 file name containing the import (string)
271 </dd><dt><i>importedModule</i></dt> 347 </dd>
348 <dt><i>importedModule</i></dt>
272 <dd> 349 <dd>
273 name of the imported module (string) 350 name of the imported module (string)
274 </dd> 351 </dd>
275 </dl><a NAME="ImportedModule.addImport" ID="ImportedModule.addImport"></a> 352 </dl>
353 <a NAME="ImportedModule.addImport" ID="ImportedModule.addImport"></a>
276 <h4>ImportedModule.addImport</h4> 354 <h4>ImportedModule.addImport</h4>
277 <b>addImport</b>(<i>lineno, importedNames</i>) 355 <b>addImport</b>(<i>lineno, importedNames</i>)
356
278 <p> 357 <p>
279 Public method to add a list of imported names. 358 Public method to add a list of imported names.
280 </p><dl> 359 </p>
360 <dl>
361
281 <dt><i>lineno</i></dt> 362 <dt><i>lineno</i></dt>
282 <dd> 363 <dd>
283 line number of the import 364 line number of the import
284 </dd><dt><i>importedNames</i></dt> 365 </dd>
366 <dt><i>importedNames</i></dt>
285 <dd> 367 <dd>
286 list of imported names (list of strings) 368 list of imported names (list of strings)
287 </dd> 369 </dd>
288 </dl> 370 </dl>
289 <div align="right"><a href="#top">Up</a></div> 371 <div align="right"><a href="#top">Up</a></div>
290 <hr /><hr /> 372 <hr />
373 <hr />
291 <a NAME="Imports" ID="Imports"></a> 374 <a NAME="Imports" ID="Imports"></a>
292 <h2>Imports</h2> 375 <h2>Imports</h2>
376
293 <p> 377 <p>
294 Class to represent the list of imported modules. 378 Class to represent the list of imported modules.
295 </p> 379 </p>
296 <h3>Derived from</h3> 380 <h3>Derived from</h3>
297 object 381 object
298 <h3>Class Attributes</h3> 382 <h3>Class Attributes</h3>
383
299 <table> 384 <table>
300 <tr><td>None</td></tr> 385 <tr><td>None</td></tr>
301 </table> 386 </table>
302 <h3>Class Methods</h3> 387 <h3>Class Methods</h3>
388
303 <table> 389 <table>
304 <tr><td>None</td></tr> 390 <tr><td>None</td></tr>
305 </table> 391 </table>
306 <h3>Methods</h3> 392 <h3>Methods</h3>
307 <table> 393
394 <table>
395
308 <tr> 396 <tr>
309 <td><a href="#Imports.__init__">Imports</a></td> 397 <td><a href="#Imports.__init__">Imports</a></td>
310 <td>Constructor</td> 398 <td>Constructor</td>
311 </tr><tr> 399 </tr>
400 <tr>
312 <td><a href="#Imports.addImport">addImport</a></td> 401 <td><a href="#Imports.addImport">addImport</a></td>
313 <td>Public method to add a list of imported names.</td> 402 <td>Public method to add a list of imported names.</td>
314 </tr><tr> 403 </tr>
404 <tr>
315 <td><a href="#Imports.getImport">getImport</a></td> 405 <td><a href="#Imports.getImport">getImport</a></td>
316 <td>Public method to get an imported module item.</td> 406 <td>Public method to get an imported module item.</td>
317 </tr><tr> 407 </tr>
408 <tr>
318 <td><a href="#Imports.getImports">getImports</a></td> 409 <td><a href="#Imports.getImports">getImports</a></td>
319 <td>Public method to get all imported module names.</td> 410 <td>Public method to get all imported module names.</td>
320 </tr> 411 </tr>
321 </table> 412 </table>
322 <h3>Static Methods</h3> 413 <h3>Static Methods</h3>
323 <table> 414
324 <tr><td>None</td></tr> 415 <table>
325 </table> 416 <tr><td>None</td></tr>
417 </table>
418
326 <a NAME="Imports.__init__" ID="Imports.__init__"></a> 419 <a NAME="Imports.__init__" ID="Imports.__init__"></a>
327 <h4>Imports (Constructor)</h4> 420 <h4>Imports (Constructor)</h4>
328 <b>Imports</b>(<i>module, file</i>) 421 <b>Imports</b>(<i>module, file</i>)
422
329 <p> 423 <p>
330 Constructor 424 Constructor
331 </p><dl> 425 </p>
426 <dl>
427
332 <dt><i>module</i></dt> 428 <dt><i>module</i></dt>
333 <dd> 429 <dd>
334 name of the module containing the import (string) 430 name of the module containing the import (string)
335 </dd><dt><i>file</i></dt> 431 </dd>
432 <dt><i>file</i></dt>
336 <dd> 433 <dd>
337 file name containing the import (string) 434 file name containing the import (string)
338 </dd> 435 </dd>
339 </dl><a NAME="Imports.addImport" ID="Imports.addImport"></a> 436 </dl>
437 <a NAME="Imports.addImport" ID="Imports.addImport"></a>
340 <h4>Imports.addImport</h4> 438 <h4>Imports.addImport</h4>
341 <b>addImport</b>(<i>moduleName, names, lineno</i>) 439 <b>addImport</b>(<i>moduleName, names, lineno</i>)
440
342 <p> 441 <p>
343 Public method to add a list of imported names. 442 Public method to add a list of imported names.
344 </p><dl> 443 </p>
444 <dl>
445
345 <dt><i>moduleName</i></dt> 446 <dt><i>moduleName</i></dt>
346 <dd> 447 <dd>
347 name of the imported module (string) 448 name of the imported module (string)
348 </dd><dt><i>names</i></dt> 449 </dd>
450 <dt><i>names</i></dt>
349 <dd> 451 <dd>
350 list of names (list of strings) 452 list of names (list of strings)
351 </dd><dt><i>lineno</i></dt> 453 </dd>
454 <dt><i>lineno</i></dt>
352 <dd> 455 <dd>
353 line number of the import 456 line number of the import
354 </dd> 457 </dd>
355 </dl><a NAME="Imports.getImport" ID="Imports.getImport"></a> 458 </dl>
459 <a NAME="Imports.getImport" ID="Imports.getImport"></a>
356 <h4>Imports.getImport</h4> 460 <h4>Imports.getImport</h4>
357 <b>getImport</b>(<i>moduleName</i>) 461 <b>getImport</b>(<i>moduleName</i>)
462
358 <p> 463 <p>
359 Public method to get an imported module item. 464 Public method to get an imported module item.
360 </p><dl> 465 </p>
466 <dl>
467
361 <dt><i>moduleName</i></dt> 468 <dt><i>moduleName</i></dt>
362 <dd> 469 <dd>
363 name of the imported module (string) 470 name of the imported module (string)
364 </dd> 471 </dd>
365 </dl><dl> 472 </dl>
473 <dl>
366 <dt>Returns:</dt> 474 <dt>Returns:</dt>
367 <dd> 475 <dd>
368 imported module item (ImportedModule) or None 476 imported module item (ImportedModule) or None
369 </dd> 477 </dd>
370 </dl><a NAME="Imports.getImports" ID="Imports.getImports"></a> 478 </dl>
479 <a NAME="Imports.getImports" ID="Imports.getImports"></a>
371 <h4>Imports.getImports</h4> 480 <h4>Imports.getImports</h4>
372 <b>getImports</b>(<i></i>) 481 <b>getImports</b>(<i></i>)
482
373 <p> 483 <p>
374 Public method to get all imported module names. 484 Public method to get all imported module names.
375 </p><dl> 485 </p>
486 <dl>
376 <dt>Returns:</dt> 487 <dt>Returns:</dt>
377 <dd> 488 <dd>
378 dictionary of imported module names with name as key and list 489 dictionary of imported module names with name as key and list
379 of line numbers of imports as value 490 of line numbers of imports as value
380 </dd> 491 </dd>
381 </dl> 492 </dl>
382 <div align="right"><a href="#top">Up</a></div> 493 <div align="right"><a href="#top">Up</a></div>
383 <hr /><hr /> 494 <hr />
495 <hr />
384 <a NAME="Publics" ID="Publics"></a> 496 <a NAME="Publics" ID="Publics"></a>
385 <h2>Publics</h2> 497 <h2>Publics</h2>
498
386 <p> 499 <p>
387 Class to represent the list of public identifiers. 500 Class to represent the list of public identifiers.
388 </p> 501 </p>
389 <h3>Derived from</h3> 502 <h3>Derived from</h3>
390 object 503 object
391 <h3>Class Attributes</h3> 504 <h3>Class Attributes</h3>
505
392 <table> 506 <table>
393 <tr><td>None</td></tr> 507 <tr><td>None</td></tr>
394 </table> 508 </table>
395 <h3>Class Methods</h3> 509 <h3>Class Methods</h3>
510
396 <table> 511 <table>
397 <tr><td>None</td></tr> 512 <tr><td>None</td></tr>
398 </table> 513 </table>
399 <h3>Methods</h3> 514 <h3>Methods</h3>
400 <table> 515
516 <table>
517
401 <tr> 518 <tr>
402 <td><a href="#Publics.__init__">Publics</a></td> 519 <td><a href="#Publics.__init__">Publics</a></td>
403 <td>Constructor</td> 520 <td>Constructor</td>
404 </tr> 521 </tr>
405 </table> 522 </table>
406 <h3>Static Methods</h3> 523 <h3>Static Methods</h3>
407 <table> 524
408 <tr><td>None</td></tr> 525 <table>
409 </table> 526 <tr><td>None</td></tr>
527 </table>
528
410 <a NAME="Publics.__init__" ID="Publics.__init__"></a> 529 <a NAME="Publics.__init__" ID="Publics.__init__"></a>
411 <h4>Publics (Constructor)</h4> 530 <h4>Publics (Constructor)</h4>
412 <b>Publics</b>(<i>module, file, lineno, idents</i>) 531 <b>Publics</b>(<i>module, file, lineno, idents</i>)
532
413 <p> 533 <p>
414 Constructor 534 Constructor
415 </p><dl> 535 </p>
536 <dl>
537
416 <dt><i>module</i></dt> 538 <dt><i>module</i></dt>
417 <dd> 539 <dd>
418 name of the module containing this function 540 name of the module containing this function
419 </dd><dt><i>file</i></dt> 541 </dd>
542 <dt><i>file</i></dt>
420 <dd> 543 <dd>
421 filename containing this class 544 filename containing this class
422 </dd><dt><i>lineno</i></dt> 545 </dd>
546 <dt><i>lineno</i></dt>
423 <dd> 547 <dd>
424 linenumber of the class definition 548 linenumber of the class definition
425 </dd><dt><i>idents</i></dt> 549 </dd>
550 <dt><i>idents</i></dt>
426 <dd> 551 <dd>
427 list of public identifiers 552 list of public identifiers
428 </dd> 553 </dd>
429 </dl> 554 </dl>
430 <div align="right"><a href="#top">Up</a></div> 555 <div align="right"><a href="#top">Up</a></div>
431 <hr /><hr /> 556 <hr />
557 <hr />
432 <a NAME="VisibilityMixin" ID="VisibilityMixin"></a> 558 <a NAME="VisibilityMixin" ID="VisibilityMixin"></a>
433 <h2>VisibilityMixin</h2> 559 <h2>VisibilityMixin</h2>
560
434 <p> 561 <p>
435 Mixin class implementing the notion of visibility. 562 Mixin class implementing the notion of visibility.
436 </p> 563 </p>
437 <h3>Derived from</h3> 564 <h3>Derived from</h3>
438 ClbrBaseClasses.ClbrVisibilityMixinBase 565 ClbrBaseClasses.ClbrVisibilityMixinBase
439 <h3>Class Attributes</h3> 566 <h3>Class Attributes</h3>
567
440 <table> 568 <table>
441 <tr><td>None</td></tr> 569 <tr><td>None</td></tr>
442 </table> 570 </table>
443 <h3>Class Methods</h3> 571 <h3>Class Methods</h3>
572
444 <table> 573 <table>
445 <tr><td>None</td></tr> 574 <tr><td>None</td></tr>
446 </table> 575 </table>
447 <h3>Methods</h3> 576 <h3>Methods</h3>
448 <table> 577
578 <table>
579
449 <tr> 580 <tr>
450 <td><a href="#VisibilityMixin.__init__">VisibilityMixin</a></td> 581 <td><a href="#VisibilityMixin.__init__">VisibilityMixin</a></td>
451 <td>Constructor</td> 582 <td>Constructor</td>
452 </tr> 583 </tr>
453 </table> 584 </table>
454 <h3>Static Methods</h3> 585 <h3>Static Methods</h3>
455 <table> 586
456 <tr><td>None</td></tr> 587 <table>
457 </table> 588 <tr><td>None</td></tr>
589 </table>
590
458 <a NAME="VisibilityMixin.__init__" ID="VisibilityMixin.__init__"></a> 591 <a NAME="VisibilityMixin.__init__" ID="VisibilityMixin.__init__"></a>
459 <h4>VisibilityMixin (Constructor)</h4> 592 <h4>VisibilityMixin (Constructor)</h4>
460 <b>VisibilityMixin</b>(<i></i>) 593 <b>VisibilityMixin</b>(<i></i>)
594
461 <p> 595 <p>
462 Constructor 596 Constructor
463 </p> 597 </p>
464 <div align="right"><a href="#top">Up</a></div> 598 <div align="right"><a href="#top">Up</a></div>
465 <hr /><hr /> 599 <hr />
600 <hr />
466 <a NAME="_indent" ID="_indent"></a> 601 <a NAME="_indent" ID="_indent"></a>
467 <h2>_indent</h2> 602 <h2>_indent</h2>
468 <b>_indent</b>(<i>ws</i>) 603 <b>_indent</b>(<i>ws</i>)
604
469 <p> 605 <p>
470 Module function to return the indentation depth. 606 Module function to return the indentation depth.
471 </p><dl> 607 </p>
608 <dl>
609
472 <dt><i>ws</i></dt> 610 <dt><i>ws</i></dt>
473 <dd> 611 <dd>
474 the whitespace to be checked (string) 612 the whitespace to be checked (string)
475 </dd> 613 </dd>
476 </dl><dl> 614 </dl>
615 <dl>
477 <dt>Returns:</dt> 616 <dt>Returns:</dt>
478 <dd> 617 <dd>
479 length of the whitespace string (integer) 618 length of the whitespace string (integer)
480 </dd> 619 </dd>
481 </dl> 620 </dl>
482 <div align="right"><a href="#top">Up</a></div> 621 <div align="right"><a href="#top">Up</a></div>
483 <hr /><hr /> 622 <hr />
623 <hr />
484 <a NAME="readmodule_ex" ID="readmodule_ex"></a> 624 <a NAME="readmodule_ex" ID="readmodule_ex"></a>
485 <h2>readmodule_ex</h2> 625 <h2>readmodule_ex</h2>
486 <b>readmodule_ex</b>(<i>module, path=None, inpackage=False, isPyFile=False</i>) 626 <b>readmodule_ex</b>(<i>module, path=None, inpackage=False, isPyFile=False</i>)
627
487 <p> 628 <p>
488 Read a module file and return a dictionary of classes. 629 Read a module file and return a dictionary of classes.
489 </p><p> 630 </p>
631 <p>
490 Search for MODULE in PATH and sys.path, read and parse the 632 Search for MODULE in PATH and sys.path, read and parse the
491 module and return a dictionary with one entry for each class 633 module and return a dictionary with one entry for each class
492 found in the module. 634 found in the module.
493 </p><dl> 635 </p>
636 <dl>
637
494 <dt><i>module</i></dt> 638 <dt><i>module</i></dt>
495 <dd> 639 <dd>
496 name of the module file (string) 640 name of the module file (string)
497 </dd><dt><i>path</i></dt> 641 </dd>
642 <dt><i>path</i></dt>
498 <dd> 643 <dd>
499 path the module should be searched in (list of strings) 644 path the module should be searched in (list of strings)
500 </dd><dt><i>inpackage</i></dt> 645 </dd>
646 <dt><i>inpackage</i></dt>
501 <dd> 647 <dd>
502 flag indicating a module inside a package is scanned 648 flag indicating a module inside a package is scanned
503 </dd><dt><i>isPyFile</i></dt> 649 </dd>
650 <dt><i>isPyFile</i></dt>
504 <dd> 651 <dd>
505 flag indicating a Python file (boolean) 652 flag indicating a Python file (boolean)
506 </dd> 653 </dd>
507 </dl><dl> 654 </dl>
655 <dl>
508 <dt>Returns:</dt> 656 <dt>Returns:</dt>
509 <dd> 657 <dd>
510 the resulting dictionary 658 the resulting dictionary
511 </dd> 659 </dd>
512 </dl> 660 </dl>

eric ide

mercurial