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.ModuleParser</h1> |
23 <h1>eric6.Utilities.ModuleParser</h1> |
|
24 |
23 <p> |
25 <p> |
24 Parse a Python module file. |
26 Parse a Python module file. |
25 </p><p> |
27 </p> |
|
28 <p> |
26 This module is based on pyclbr.py as of Python 2.2.2 |
29 This module is based on pyclbr.py as of Python 2.2.2 |
27 </p><p> |
30 </p> |
|
31 <p> |
28 <b>BUGS</b> (from pyclbr.py) |
32 <b>BUGS</b> (from pyclbr.py) |
29 <ul> |
33 <ul> |
30 <li>Code that doesn't pass tabnanny or python -t will confuse it, unless |
34 <li>Code that doesn't pass tabnanny or python -t will confuse it, unless |
31 you set the module TABWIDTH variable (default 8) to the correct tab width |
35 you set the module TABWIDTH variable (default 8) to the correct tab width |
32 for the file.</li> |
36 for the file.</li> |
33 </ul> |
37 </ul> |
34 </p> |
38 </p> |
35 <h3>Global Attributes</h3> |
39 <h3>Global Attributes</h3> |
|
40 |
36 <table> |
41 <table> |
37 <tr><td>PTL_SOURCE</td></tr><tr><td>RB_SOURCE</td></tr><tr><td>SUPPORTED_TYPES</td></tr><tr><td>TABWIDTH</td></tr><tr><td>TYPE_MAPPING</td></tr><tr><td>__all__</td></tr><tr><td>_commentsub</td></tr><tr><td>_hashsub</td></tr><tr><td>_modules</td></tr><tr><td>_py_getnext</td></tr><tr><td>_rb_getnext</td></tr> |
42 <tr><td>PTL_SOURCE</td></tr><tr><td>RB_SOURCE</td></tr><tr><td>SUPPORTED_TYPES</td></tr><tr><td>TABWIDTH</td></tr><tr><td>TYPE_MAPPING</td></tr><tr><td>__all__</td></tr><tr><td>_commentsub</td></tr><tr><td>_hashsub</td></tr><tr><td>_modules</td></tr><tr><td>_py_getnext</td></tr><tr><td>_rb_getnext</td></tr> |
38 </table> |
43 </table> |
39 <h3>Classes</h3> |
44 <h3>Classes</h3> |
40 <table> |
45 |
|
46 <table> |
|
47 |
41 <tr> |
48 <tr> |
42 <td><a href="#Attribute">Attribute</a></td> |
49 <td><a href="#Attribute">Attribute</a></td> |
43 <td>Class to represent a Python function or method.</td> |
50 <td>Class to represent a Python function or method.</td> |
44 </tr><tr> |
51 </tr> |
|
52 <tr> |
45 <td><a href="#Class">Class</a></td> |
53 <td><a href="#Class">Class</a></td> |
46 <td>Class to represent a Python class.</td> |
54 <td>Class to represent a Python class.</td> |
47 </tr><tr> |
55 </tr> |
|
56 <tr> |
48 <td><a href="#Function">Function</a></td> |
57 <td><a href="#Function">Function</a></td> |
49 <td>Class to represent a Python function or method.</td> |
58 <td>Class to represent a Python function or method.</td> |
50 </tr><tr> |
59 </tr> |
|
60 <tr> |
51 <td><a href="#Module">Module</a></td> |
61 <td><a href="#Module">Module</a></td> |
52 <td>Class to represent a Python module.</td> |
62 <td>Class to represent a Python module.</td> |
53 </tr><tr> |
63 </tr> |
|
64 <tr> |
54 <td><a href="#RbModule">RbModule</a></td> |
65 <td><a href="#RbModule">RbModule</a></td> |
55 <td>Class to represent a Ruby module.</td> |
66 <td>Class to represent a Ruby module.</td> |
56 </tr><tr> |
67 </tr> |
|
68 <tr> |
57 <td><a href="#VisibilityBase">VisibilityBase</a></td> |
69 <td><a href="#VisibilityBase">VisibilityBase</a></td> |
58 <td>Class implementing the visibility aspect of all objects.</td> |
70 <td>Class implementing the visibility aspect of all objects.</td> |
59 </tr> |
71 </tr> |
60 </table> |
72 </table> |
61 <h3>Functions</h3> |
73 <h3>Functions</h3> |
62 <table> |
74 |
|
75 <table> |
|
76 |
63 <tr> |
77 <tr> |
64 <td><a href="#_indent">_indent</a></td> |
78 <td><a href="#_indent">_indent</a></td> |
65 <td>Protected function to determine the indent width of a whitespace string.</td> |
79 <td>Protected function to determine the indent width of a whitespace string.</td> |
66 </tr><tr> |
80 </tr> |
|
81 <tr> |
67 <td><a href="#find_module">find_module</a></td> |
82 <td><a href="#find_module">find_module</a></td> |
68 <td>Module function to extend the Python module finding mechanism.</td> |
83 <td>Module function to extend the Python module finding mechanism.</td> |
69 </tr><tr> |
84 </tr> |
|
85 <tr> |
70 <td><a href="#getTypeFromTypeName">getTypeFromTypeName</a></td> |
86 <td><a href="#getTypeFromTypeName">getTypeFromTypeName</a></td> |
71 <td>Module function to determine the module type given the module type name.</td> |
87 <td>Module function to determine the module type given the module type name.</td> |
72 </tr><tr> |
88 </tr> |
|
89 <tr> |
73 <td><a href="#readModule">readModule</a></td> |
90 <td><a href="#readModule">readModule</a></td> |
74 <td>Function to read a module file and parse it.</td> |
91 <td>Function to read a module file and parse it.</td> |
75 </tr><tr> |
92 </tr> |
|
93 <tr> |
76 <td><a href="#resetParsedModule">resetParsedModule</a></td> |
94 <td><a href="#resetParsedModule">resetParsedModule</a></td> |
77 <td>Module function to clear one module from the list of parsed modules.</td> |
95 <td>Module function to clear one module from the list of parsed modules.</td> |
78 </tr><tr> |
96 </tr> |
|
97 <tr> |
79 <td><a href="#resetParsedModules">resetParsedModules</a></td> |
98 <td><a href="#resetParsedModules">resetParsedModules</a></td> |
80 <td>Module function to reset the list of modules already parsed.</td> |
99 <td>Module function to reset the list of modules already parsed.</td> |
81 </tr> |
100 </tr> |
82 </table> |
101 </table> |
83 <hr /><hr /> |
102 <hr /> |
|
103 <hr /> |
84 <a NAME="Attribute" ID="Attribute"></a> |
104 <a NAME="Attribute" ID="Attribute"></a> |
85 <h2>Attribute</h2> |
105 <h2>Attribute</h2> |
|
106 |
86 <p> |
107 <p> |
87 Class to represent a Python function or method. |
108 Class to represent a Python function or method. |
88 </p> |
109 </p> |
89 <h3>Derived from</h3> |
110 <h3>Derived from</h3> |
90 VisibilityBase |
111 VisibilityBase |
91 <h3>Class Attributes</h3> |
112 <h3>Class Attributes</h3> |
|
113 |
92 <table> |
114 <table> |
93 <tr><td>None</td></tr> |
115 <tr><td>None</td></tr> |
94 </table> |
116 </table> |
95 <h3>Class Methods</h3> |
117 <h3>Class Methods</h3> |
|
118 |
96 <table> |
119 <table> |
97 <tr><td>None</td></tr> |
120 <tr><td>None</td></tr> |
98 </table> |
121 </table> |
99 <h3>Methods</h3> |
122 <h3>Methods</h3> |
100 <table> |
123 |
|
124 <table> |
|
125 |
101 <tr> |
126 <tr> |
102 <td><a href="#Attribute.__init__">Attribute</a></td> |
127 <td><a href="#Attribute.__init__">Attribute</a></td> |
103 <td>Constructor</td> |
128 <td>Constructor</td> |
104 </tr><tr> |
129 </tr> |
|
130 <tr> |
105 <td><a href="#Attribute.addAssignment">addAssignment</a></td> |
131 <td><a href="#Attribute.addAssignment">addAssignment</a></td> |
106 <td>Public method to add another assignment line number.</td> |
132 <td>Public method to add another assignment line number.</td> |
107 </tr> |
133 </tr> |
108 </table> |
134 </table> |
109 <h3>Static Methods</h3> |
135 <h3>Static Methods</h3> |
110 <table> |
136 |
111 <tr><td>None</td></tr> |
137 <table> |
112 </table> |
138 <tr><td>None</td></tr> |
|
139 </table> |
|
140 |
113 <a NAME="Attribute.__init__" ID="Attribute.__init__"></a> |
141 <a NAME="Attribute.__init__" ID="Attribute.__init__"></a> |
114 <h4>Attribute (Constructor)</h4> |
142 <h4>Attribute (Constructor)</h4> |
115 <b>Attribute</b>(<i>module, name, file, lineno, isSignal=False</i>) |
143 <b>Attribute</b>(<i>module, name, file, lineno, isSignal=False</i>) |
|
144 |
116 <p> |
145 <p> |
117 Constructor |
146 Constructor |
118 </p><dl> |
147 </p> |
|
148 <dl> |
|
149 |
119 <dt><i>module</i></dt> |
150 <dt><i>module</i></dt> |
120 <dd> |
151 <dd> |
121 name of module containing this function (string) |
152 name of module containing this function (string) |
122 </dd><dt><i>name</i></dt> |
153 </dd> |
|
154 <dt><i>name</i></dt> |
123 <dd> |
155 <dd> |
124 name of the function (string) |
156 name of the function (string) |
125 </dd><dt><i>file</i></dt> |
157 </dd> |
|
158 <dt><i>file</i></dt> |
126 <dd> |
159 <dd> |
127 name of file containing this function (string) |
160 name of file containing this function (string) |
128 </dd><dt><i>lineno</i></dt> |
161 </dd> |
|
162 <dt><i>lineno</i></dt> |
129 <dd> |
163 <dd> |
130 linenumber of the first attribute assignment (integer) |
164 linenumber of the first attribute assignment (integer) |
131 </dd><dt><i>isSignal=</i></dt> |
165 </dd> |
|
166 <dt><i>isSignal=</i></dt> |
132 <dd> |
167 <dd> |
133 flag indicating a signal definition (boolean) |
168 flag indicating a signal definition (boolean) |
134 </dd> |
169 </dd> |
135 </dl><a NAME="Attribute.addAssignment" ID="Attribute.addAssignment"></a> |
170 </dl> |
|
171 <a NAME="Attribute.addAssignment" ID="Attribute.addAssignment"></a> |
136 <h4>Attribute.addAssignment</h4> |
172 <h4>Attribute.addAssignment</h4> |
137 <b>addAssignment</b>(<i>lineno</i>) |
173 <b>addAssignment</b>(<i>lineno</i>) |
|
174 |
138 <p> |
175 <p> |
139 Public method to add another assignment line number. |
176 Public method to add another assignment line number. |
140 </p><dl> |
177 </p> |
|
178 <dl> |
|
179 |
141 <dt><i>lineno</i></dt> |
180 <dt><i>lineno</i></dt> |
142 <dd> |
181 <dd> |
143 linenumber of the additional attribute assignment |
182 linenumber of the additional attribute assignment |
144 (integer) |
183 (integer) |
145 </dd> |
184 </dd> |
146 </dl> |
185 </dl> |
147 <div align="right"><a href="#top">Up</a></div> |
186 <div align="right"><a href="#top">Up</a></div> |
148 <hr /><hr /> |
187 <hr /> |
|
188 <hr /> |
149 <a NAME="Class" ID="Class"></a> |
189 <a NAME="Class" ID="Class"></a> |
150 <h2>Class</h2> |
190 <h2>Class</h2> |
|
191 |
151 <p> |
192 <p> |
152 Class to represent a Python class. |
193 Class to represent a Python class. |
153 </p> |
194 </p> |
154 <h3>Derived from</h3> |
195 <h3>Derived from</h3> |
155 VisibilityBase |
196 VisibilityBase |
156 <h3>Class Attributes</h3> |
197 <h3>Class Attributes</h3> |
|
198 |
157 <table> |
199 <table> |
158 <tr><td>None</td></tr> |
200 <tr><td>None</td></tr> |
159 </table> |
201 </table> |
160 <h3>Class Methods</h3> |
202 <h3>Class Methods</h3> |
|
203 |
161 <table> |
204 <table> |
162 <tr><td>None</td></tr> |
205 <tr><td>None</td></tr> |
163 </table> |
206 </table> |
164 <h3>Methods</h3> |
207 <h3>Methods</h3> |
165 <table> |
208 |
|
209 <table> |
|
210 |
166 <tr> |
211 <tr> |
167 <td><a href="#Class.__init__">Class</a></td> |
212 <td><a href="#Class.__init__">Class</a></td> |
168 <td>Constructor</td> |
213 <td>Constructor</td> |
169 </tr><tr> |
214 </tr> |
|
215 <tr> |
170 <td><a href="#Class.addAttribute">addAttribute</a></td> |
216 <td><a href="#Class.addAttribute">addAttribute</a></td> |
171 <td>Public method to add information about attributes.</td> |
217 <td>Public method to add information about attributes.</td> |
172 </tr><tr> |
218 </tr> |
|
219 <tr> |
173 <td><a href="#Class.addDescription">addDescription</a></td> |
220 <td><a href="#Class.addDescription">addDescription</a></td> |
174 <td>Public method to store the class docstring.</td> |
221 <td>Public method to store the class docstring.</td> |
175 </tr><tr> |
222 </tr> |
|
223 <tr> |
176 <td><a href="#Class.addGlobal">addGlobal</a></td> |
224 <td><a href="#Class.addGlobal">addGlobal</a></td> |
177 <td>Public method to add information about global (class) variables.</td> |
225 <td>Public method to add information about global (class) variables.</td> |
178 </tr><tr> |
226 </tr> |
|
227 <tr> |
179 <td><a href="#Class.addMethod">addMethod</a></td> |
228 <td><a href="#Class.addMethod">addMethod</a></td> |
180 <td>Public method to add information about a method.</td> |
229 <td>Public method to add information about a method.</td> |
181 </tr><tr> |
230 </tr> |
|
231 <tr> |
182 <td><a href="#Class.getAttribute">getAttribute</a></td> |
232 <td><a href="#Class.getAttribute">getAttribute</a></td> |
183 <td>Public method to retrieve an attribute by name.</td> |
233 <td>Public method to retrieve an attribute by name.</td> |
184 </tr><tr> |
234 </tr> |
|
235 <tr> |
185 <td><a href="#Class.getMethod">getMethod</a></td> |
236 <td><a href="#Class.getMethod">getMethod</a></td> |
186 <td>Public method to retrieve a method by name.</td> |
237 <td>Public method to retrieve a method by name.</td> |
187 </tr><tr> |
238 </tr> |
|
239 <tr> |
188 <td><a href="#Class.setEndLine">setEndLine</a></td> |
240 <td><a href="#Class.setEndLine">setEndLine</a></td> |
189 <td>Public method to record the number of the last line of a class.</td> |
241 <td>Public method to record the number of the last line of a class.</td> |
190 </tr> |
242 </tr> |
191 </table> |
243 </table> |
192 <h3>Static Methods</h3> |
244 <h3>Static Methods</h3> |
193 <table> |
245 |
194 <tr><td>None</td></tr> |
246 <table> |
195 </table> |
247 <tr><td>None</td></tr> |
|
248 </table> |
|
249 |
196 <a NAME="Class.__init__" ID="Class.__init__"></a> |
250 <a NAME="Class.__init__" ID="Class.__init__"></a> |
197 <h4>Class (Constructor)</h4> |
251 <h4>Class (Constructor)</h4> |
198 <b>Class</b>(<i>module, name, superClasses, file, lineno</i>) |
252 <b>Class</b>(<i>module, name, superClasses, file, lineno</i>) |
|
253 |
199 <p> |
254 <p> |
200 Constructor |
255 Constructor |
201 </p><dl> |
256 </p> |
|
257 <dl> |
|
258 |
202 <dt><i>module</i></dt> |
259 <dt><i>module</i></dt> |
203 <dd> |
260 <dd> |
204 name of module containing this class (string) |
261 name of module containing this class (string) |
205 </dd><dt><i>name</i></dt> |
262 </dd> |
|
263 <dt><i>name</i></dt> |
206 <dd> |
264 <dd> |
207 name of the class (string) |
265 name of the class (string) |
208 </dd><dt><i>superClasses</i></dt> |
266 </dd> |
|
267 <dt><i>superClasses</i></dt> |
209 <dd> |
268 <dd> |
210 list of classnames this class is inherited from |
269 list of classnames this class is inherited from |
211 (list of strings) |
270 (list of strings) |
212 </dd><dt><i>file</i></dt> |
271 </dd> |
|
272 <dt><i>file</i></dt> |
213 <dd> |
273 <dd> |
214 name of file containing this class (string) |
274 name of file containing this class (string) |
215 </dd><dt><i>lineno</i></dt> |
275 </dd> |
|
276 <dt><i>lineno</i></dt> |
216 <dd> |
277 <dd> |
217 linenumber of the class definition (integer) |
278 linenumber of the class definition (integer) |
218 </dd> |
279 </dd> |
219 </dl><a NAME="Class.addAttribute" ID="Class.addAttribute"></a> |
280 </dl> |
|
281 <a NAME="Class.addAttribute" ID="Class.addAttribute"></a> |
220 <h4>Class.addAttribute</h4> |
282 <h4>Class.addAttribute</h4> |
221 <b>addAttribute</b>(<i>name, attr</i>) |
283 <b>addAttribute</b>(<i>name, attr</i>) |
|
284 |
222 <p> |
285 <p> |
223 Public method to add information about attributes. |
286 Public method to add information about attributes. |
224 </p><dl> |
287 </p> |
|
288 <dl> |
|
289 |
225 <dt><i>name</i></dt> |
290 <dt><i>name</i></dt> |
226 <dd> |
291 <dd> |
227 name of the attribute to add (string) |
292 name of the attribute to add (string) |
228 </dd><dt><i>attr</i></dt> |
293 </dd> |
|
294 <dt><i>attr</i></dt> |
229 <dd> |
295 <dd> |
230 Attribute object to be added |
296 Attribute object to be added |
231 </dd> |
297 </dd> |
232 </dl><a NAME="Class.addDescription" ID="Class.addDescription"></a> |
298 </dl> |
|
299 <a NAME="Class.addDescription" ID="Class.addDescription"></a> |
233 <h4>Class.addDescription</h4> |
300 <h4>Class.addDescription</h4> |
234 <b>addDescription</b>(<i>description</i>) |
301 <b>addDescription</b>(<i>description</i>) |
|
302 |
235 <p> |
303 <p> |
236 Public method to store the class docstring. |
304 Public method to store the class docstring. |
237 </p><dl> |
305 </p> |
|
306 <dl> |
|
307 |
238 <dt><i>description</i></dt> |
308 <dt><i>description</i></dt> |
239 <dd> |
309 <dd> |
240 the docstring to be stored (string) |
310 the docstring to be stored (string) |
241 </dd> |
311 </dd> |
242 </dl><a NAME="Class.addGlobal" ID="Class.addGlobal"></a> |
312 </dl> |
|
313 <a NAME="Class.addGlobal" ID="Class.addGlobal"></a> |
243 <h4>Class.addGlobal</h4> |
314 <h4>Class.addGlobal</h4> |
244 <b>addGlobal</b>(<i>name, attr</i>) |
315 <b>addGlobal</b>(<i>name, attr</i>) |
|
316 |
245 <p> |
317 <p> |
246 Public method to add information about global (class) variables. |
318 Public method to add information about global (class) variables. |
247 </p><dl> |
319 </p> |
|
320 <dl> |
|
321 |
248 <dt><i>name</i></dt> |
322 <dt><i>name</i></dt> |
249 <dd> |
323 <dd> |
250 name of the global to add (string) |
324 name of the global to add (string) |
251 </dd><dt><i>attr</i></dt> |
325 </dd> |
|
326 <dt><i>attr</i></dt> |
252 <dd> |
327 <dd> |
253 Attribute object to be added |
328 Attribute object to be added |
254 </dd> |
329 </dd> |
255 </dl><a NAME="Class.addMethod" ID="Class.addMethod"></a> |
330 </dl> |
|
331 <a NAME="Class.addMethod" ID="Class.addMethod"></a> |
256 <h4>Class.addMethod</h4> |
332 <h4>Class.addMethod</h4> |
257 <b>addMethod</b>(<i>name, function</i>) |
333 <b>addMethod</b>(<i>name, function</i>) |
|
334 |
258 <p> |
335 <p> |
259 Public method to add information about a method. |
336 Public method to add information about a method. |
260 </p><dl> |
337 </p> |
|
338 <dl> |
|
339 |
261 <dt><i>name</i></dt> |
340 <dt><i>name</i></dt> |
262 <dd> |
341 <dd> |
263 name of method to be added (string) |
342 name of method to be added (string) |
264 </dd><dt><i>function</i></dt> |
343 </dd> |
|
344 <dt><i>function</i></dt> |
265 <dd> |
345 <dd> |
266 Function object to be added |
346 Function object to be added |
267 </dd> |
347 </dd> |
268 </dl><a NAME="Class.getAttribute" ID="Class.getAttribute"></a> |
348 </dl> |
|
349 <a NAME="Class.getAttribute" ID="Class.getAttribute"></a> |
269 <h4>Class.getAttribute</h4> |
350 <h4>Class.getAttribute</h4> |
270 <b>getAttribute</b>(<i>name</i>) |
351 <b>getAttribute</b>(<i>name</i>) |
|
352 |
271 <p> |
353 <p> |
272 Public method to retrieve an attribute by name. |
354 Public method to retrieve an attribute by name. |
273 </p><dl> |
355 </p> |
|
356 <dl> |
|
357 |
274 <dt><i>name</i></dt> |
358 <dt><i>name</i></dt> |
275 <dd> |
359 <dd> |
276 name of the attribute (string) |
360 name of the attribute (string) |
277 </dd> |
361 </dd> |
278 </dl><dl> |
362 </dl> |
|
363 <dl> |
279 <dt>Returns:</dt> |
364 <dt>Returns:</dt> |
280 <dd> |
365 <dd> |
281 the named attribute or None |
366 the named attribute or None |
282 </dd> |
367 </dd> |
283 </dl><a NAME="Class.getMethod" ID="Class.getMethod"></a> |
368 </dl> |
|
369 <a NAME="Class.getMethod" ID="Class.getMethod"></a> |
284 <h4>Class.getMethod</h4> |
370 <h4>Class.getMethod</h4> |
285 <b>getMethod</b>(<i>name</i>) |
371 <b>getMethod</b>(<i>name</i>) |
|
372 |
286 <p> |
373 <p> |
287 Public method to retrieve a method by name. |
374 Public method to retrieve a method by name. |
288 </p><dl> |
375 </p> |
|
376 <dl> |
|
377 |
289 <dt><i>name</i></dt> |
378 <dt><i>name</i></dt> |
290 <dd> |
379 <dd> |
291 name of the method (string) |
380 name of the method (string) |
292 </dd> |
381 </dd> |
293 </dl><dl> |
382 </dl> |
|
383 <dl> |
294 <dt>Returns:</dt> |
384 <dt>Returns:</dt> |
295 <dd> |
385 <dd> |
296 the named method or None |
386 the named method or None |
297 </dd> |
387 </dd> |
298 </dl><a NAME="Class.setEndLine" ID="Class.setEndLine"></a> |
388 </dl> |
|
389 <a NAME="Class.setEndLine" ID="Class.setEndLine"></a> |
299 <h4>Class.setEndLine</h4> |
390 <h4>Class.setEndLine</h4> |
300 <b>setEndLine</b>(<i>endLineNo</i>) |
391 <b>setEndLine</b>(<i>endLineNo</i>) |
|
392 |
301 <p> |
393 <p> |
302 Public method to record the number of the last line of a class. |
394 Public method to record the number of the last line of a class. |
303 </p><dl> |
395 </p> |
|
396 <dl> |
|
397 |
304 <dt><i>endLineNo</i></dt> |
398 <dt><i>endLineNo</i></dt> |
305 <dd> |
399 <dd> |
306 number of the last line (integer) |
400 number of the last line (integer) |
307 </dd> |
401 </dd> |
308 </dl> |
402 </dl> |
309 <div align="right"><a href="#top">Up</a></div> |
403 <div align="right"><a href="#top">Up</a></div> |
310 <hr /><hr /> |
404 <hr /> |
|
405 <hr /> |
311 <a NAME="Function" ID="Function"></a> |
406 <a NAME="Function" ID="Function"></a> |
312 <h2>Function</h2> |
407 <h2>Function</h2> |
|
408 |
313 <p> |
409 <p> |
314 Class to represent a Python function or method. |
410 Class to represent a Python function or method. |
315 </p> |
411 </p> |
316 <h3>Derived from</h3> |
412 <h3>Derived from</h3> |
317 VisibilityBase |
413 VisibilityBase |
318 <h3>Class Attributes</h3> |
414 <h3>Class Attributes</h3> |
|
415 |
319 <table> |
416 <table> |
320 <tr><td>Class</td></tr><tr><td>General</td></tr><tr><td>Static</td></tr> |
417 <tr><td>Class</td></tr><tr><td>General</td></tr><tr><td>Static</td></tr> |
321 </table> |
418 </table> |
322 <h3>Class Methods</h3> |
419 <h3>Class Methods</h3> |
|
420 |
323 <table> |
421 <table> |
324 <tr><td>None</td></tr> |
422 <tr><td>None</td></tr> |
325 </table> |
423 </table> |
326 <h3>Methods</h3> |
424 <h3>Methods</h3> |
327 <table> |
425 |
|
426 <table> |
|
427 |
328 <tr> |
428 <tr> |
329 <td><a href="#Function.__init__">Function</a></td> |
429 <td><a href="#Function.__init__">Function</a></td> |
330 <td>Constructor</td> |
430 <td>Constructor</td> |
331 </tr><tr> |
431 </tr> |
|
432 <tr> |
332 <td><a href="#Function.addDescription">addDescription</a></td> |
433 <td><a href="#Function.addDescription">addDescription</a></td> |
333 <td>Public method to store the functions docstring.</td> |
434 <td>Public method to store the functions docstring.</td> |
334 </tr><tr> |
435 </tr> |
|
436 <tr> |
335 <td><a href="#Function.setEndLine">setEndLine</a></td> |
437 <td><a href="#Function.setEndLine">setEndLine</a></td> |
336 <td>Public method to record the number of the last line of a class.</td> |
438 <td>Public method to record the number of the last line of a class.</td> |
337 </tr> |
439 </tr> |
338 </table> |
440 </table> |
339 <h3>Static Methods</h3> |
441 <h3>Static Methods</h3> |
340 <table> |
442 |
341 <tr><td>None</td></tr> |
443 <table> |
342 </table> |
444 <tr><td>None</td></tr> |
|
445 </table> |
|
446 |
343 <a NAME="Function.__init__" ID="Function.__init__"></a> |
447 <a NAME="Function.__init__" ID="Function.__init__"></a> |
344 <h4>Function (Constructor)</h4> |
448 <h4>Function (Constructor)</h4> |
345 <b>Function</b>(<i>module, name, file, lineno, signature='', pyqtSignature=None, modifierType=General, annotation=""</i>) |
449 <b>Function</b>(<i>module, name, file, lineno, signature='', pyqtSignature=None, modifierType=General, annotation=""</i>) |
|
450 |
346 <p> |
451 <p> |
347 Constructor |
452 Constructor |
348 </p><dl> |
453 </p> |
|
454 <dl> |
|
455 |
349 <dt><i>module</i></dt> |
456 <dt><i>module</i></dt> |
350 <dd> |
457 <dd> |
351 name of module containing this function (string) |
458 name of module containing this function (string) |
352 </dd><dt><i>name</i></dt> |
459 </dd> |
|
460 <dt><i>name</i></dt> |
353 <dd> |
461 <dd> |
354 name of the function (string) |
462 name of the function (string) |
355 </dd><dt><i>file</i></dt> |
463 </dd> |
|
464 <dt><i>file</i></dt> |
356 <dd> |
465 <dd> |
357 name of file containing this function (string) |
466 name of file containing this function (string) |
358 </dd><dt><i>lineno</i></dt> |
467 </dd> |
|
468 <dt><i>lineno</i></dt> |
359 <dd> |
469 <dd> |
360 linenumber of the function definition (integer) |
470 linenumber of the function definition (integer) |
361 </dd><dt><i>signature</i></dt> |
471 </dd> |
|
472 <dt><i>signature</i></dt> |
362 <dd> |
473 <dd> |
363 the functions call signature (string) |
474 the functions call signature (string) |
364 </dd><dt><i>pyqtSignature</i></dt> |
475 </dd> |
|
476 <dt><i>pyqtSignature</i></dt> |
365 <dd> |
477 <dd> |
366 the functions PyQt signature (string) |
478 the functions PyQt signature (string) |
367 </dd><dt><i>modifierType</i></dt> |
479 </dd> |
|
480 <dt><i>modifierType</i></dt> |
368 <dd> |
481 <dd> |
369 type of the function |
482 type of the function |
370 </dd><dt><i>annotation</i></dt> |
483 </dd> |
|
484 <dt><i>annotation</i></dt> |
371 <dd> |
485 <dd> |
372 return annotation |
486 return annotation |
373 </dd> |
487 </dd> |
374 </dl><a NAME="Function.addDescription" ID="Function.addDescription"></a> |
488 </dl> |
|
489 <a NAME="Function.addDescription" ID="Function.addDescription"></a> |
375 <h4>Function.addDescription</h4> |
490 <h4>Function.addDescription</h4> |
376 <b>addDescription</b>(<i>description</i>) |
491 <b>addDescription</b>(<i>description</i>) |
|
492 |
377 <p> |
493 <p> |
378 Public method to store the functions docstring. |
494 Public method to store the functions docstring. |
379 </p><dl> |
495 </p> |
|
496 <dl> |
|
497 |
380 <dt><i>description</i></dt> |
498 <dt><i>description</i></dt> |
381 <dd> |
499 <dd> |
382 the docstring to be stored (string) |
500 the docstring to be stored (string) |
383 </dd> |
501 </dd> |
384 </dl><a NAME="Function.setEndLine" ID="Function.setEndLine"></a> |
502 </dl> |
|
503 <a NAME="Function.setEndLine" ID="Function.setEndLine"></a> |
385 <h4>Function.setEndLine</h4> |
504 <h4>Function.setEndLine</h4> |
386 <b>setEndLine</b>(<i>endLineNo</i>) |
505 <b>setEndLine</b>(<i>endLineNo</i>) |
|
506 |
387 <p> |
507 <p> |
388 Public method to record the number of the last line of a class. |
508 Public method to record the number of the last line of a class. |
389 </p><dl> |
509 </p> |
|
510 <dl> |
|
511 |
390 <dt><i>endLineNo</i></dt> |
512 <dt><i>endLineNo</i></dt> |
391 <dd> |
513 <dd> |
392 number of the last line (integer) |
514 number of the last line (integer) |
393 </dd> |
515 </dd> |
394 </dl> |
516 </dl> |
395 <div align="right"><a href="#top">Up</a></div> |
517 <div align="right"><a href="#top">Up</a></div> |
396 <hr /><hr /> |
518 <hr /> |
|
519 <hr /> |
397 <a NAME="Module" ID="Module"></a> |
520 <a NAME="Module" ID="Module"></a> |
398 <h2>Module</h2> |
521 <h2>Module</h2> |
|
522 |
399 <p> |
523 <p> |
400 Class to represent a Python module. |
524 Class to represent a Python module. |
401 </p> |
525 </p> |
402 <h3>Derived from</h3> |
526 <h3>Derived from</h3> |
403 object |
527 object |
404 <h3>Class Attributes</h3> |
528 <h3>Class Attributes</h3> |
|
529 |
405 <table> |
530 <table> |
406 <tr><td>None</td></tr> |
531 <tr><td>None</td></tr> |
407 </table> |
532 </table> |
408 <h3>Class Methods</h3> |
533 <h3>Class Methods</h3> |
|
534 |
409 <table> |
535 <table> |
410 <tr><td>None</td></tr> |
536 <tr><td>None</td></tr> |
411 </table> |
537 </table> |
412 <h3>Methods</h3> |
538 <h3>Methods</h3> |
413 <table> |
539 |
|
540 <table> |
|
541 |
414 <tr> |
542 <tr> |
415 <td><a href="#Module.__init__">Module</a></td> |
543 <td><a href="#Module.__init__">Module</a></td> |
416 <td>Constructor</td> |
544 <td>Constructor</td> |
417 </tr><tr> |
545 </tr> |
|
546 <tr> |
418 <td><a href="#Module.__py_scan">__py_scan</a></td> |
547 <td><a href="#Module.__py_scan">__py_scan</a></td> |
419 <td>Private method to scan the source text of a Python module and retrieve the relevant information.</td> |
548 <td>Private method to scan the source text of a Python module and retrieve the relevant information.</td> |
420 </tr><tr> |
549 </tr> |
|
550 <tr> |
421 <td><a href="#Module.__py_setVisibility">__py_setVisibility</a></td> |
551 <td><a href="#Module.__py_setVisibility">__py_setVisibility</a></td> |
422 <td>Private method to set the visibility of an object.</td> |
552 <td>Private method to set the visibility of an object.</td> |
423 </tr><tr> |
553 </tr> |
|
554 <tr> |
424 <td><a href="#Module.__rb_scan">__rb_scan</a></td> |
555 <td><a href="#Module.__rb_scan">__rb_scan</a></td> |
425 <td>Private method to scan the source text of a Python module and retrieve the relevant information.</td> |
556 <td>Private method to scan the source text of a Python module and retrieve the relevant information.</td> |
426 </tr><tr> |
557 </tr> |
|
558 <tr> |
427 <td><a href="#Module.addClass">addClass</a></td> |
559 <td><a href="#Module.addClass">addClass</a></td> |
428 <td>Public method to add information about a class.</td> |
560 <td>Public method to add information about a class.</td> |
429 </tr><tr> |
561 </tr> |
|
562 <tr> |
430 <td><a href="#Module.addDescription">addDescription</a></td> |
563 <td><a href="#Module.addDescription">addDescription</a></td> |
431 <td>Public method to store the modules docstring.</td> |
564 <td>Public method to store the modules docstring.</td> |
432 </tr><tr> |
565 </tr> |
|
566 <tr> |
433 <td><a href="#Module.addFunction">addFunction</a></td> |
567 <td><a href="#Module.addFunction">addFunction</a></td> |
434 <td>Public method to add information about a function.</td> |
568 <td>Public method to add information about a function.</td> |
435 </tr><tr> |
569 </tr> |
|
570 <tr> |
436 <td><a href="#Module.addGlobal">addGlobal</a></td> |
571 <td><a href="#Module.addGlobal">addGlobal</a></td> |
437 <td>Public method to add information about global variables.</td> |
572 <td>Public method to add information about global variables.</td> |
438 </tr><tr> |
573 </tr> |
|
574 <tr> |
439 <td><a href="#Module.addModule">addModule</a></td> |
575 <td><a href="#Module.addModule">addModule</a></td> |
440 <td>Public method to add information about a Ruby module.</td> |
576 <td>Public method to add information about a Ruby module.</td> |
441 </tr><tr> |
577 </tr> |
|
578 <tr> |
442 <td><a href="#Module.addPathToHierarchy">addPathToHierarchy</a></td> |
579 <td><a href="#Module.addPathToHierarchy">addPathToHierarchy</a></td> |
443 <td>Public method to put the exhausted path into the result dictionary.</td> |
580 <td>Public method to put the exhausted path into the result dictionary.</td> |
444 </tr><tr> |
581 </tr> |
|
582 <tr> |
445 <td><a href="#Module.assembleHierarchy">assembleHierarchy</a></td> |
583 <td><a href="#Module.assembleHierarchy">assembleHierarchy</a></td> |
446 <td>Public method to assemble the inheritance hierarchy.</td> |
584 <td>Public method to assemble the inheritance hierarchy.</td> |
447 </tr><tr> |
585 </tr> |
|
586 <tr> |
448 <td><a href="#Module.createHierarchy">createHierarchy</a></td> |
587 <td><a href="#Module.createHierarchy">createHierarchy</a></td> |
449 <td>Public method to build the inheritance hierarchy for all classes of this module.</td> |
588 <td>Public method to build the inheritance hierarchy for all classes of this module.</td> |
450 </tr><tr> |
589 </tr> |
|
590 <tr> |
451 <td><a href="#Module.getFileName">getFileName</a></td> |
591 <td><a href="#Module.getFileName">getFileName</a></td> |
452 <td>Public method to retrieve the modules filename.</td> |
592 <td>Public method to retrieve the modules filename.</td> |
453 </tr><tr> |
593 </tr> |
|
594 <tr> |
454 <td><a href="#Module.getName">getName</a></td> |
595 <td><a href="#Module.getName">getName</a></td> |
455 <td>Public method to retrieve the modules name.</td> |
596 <td>Public method to retrieve the modules name.</td> |
456 </tr><tr> |
597 </tr> |
|
598 <tr> |
457 <td><a href="#Module.getType">getType</a></td> |
599 <td><a href="#Module.getType">getType</a></td> |
458 <td>Public method to get the type of the module's source.</td> |
600 <td>Public method to get the type of the module's source.</td> |
459 </tr><tr> |
601 </tr> |
|
602 <tr> |
460 <td><a href="#Module.scan">scan</a></td> |
603 <td><a href="#Module.scan">scan</a></td> |
461 <td>Public method to scan the source text and retrieve the relevant information.</td> |
604 <td>Public method to scan the source text and retrieve the relevant information.</td> |
462 </tr> |
605 </tr> |
463 </table> |
606 </table> |
464 <h3>Static Methods</h3> |
607 <h3>Static Methods</h3> |
465 <table> |
608 |
466 <tr><td>None</td></tr> |
609 <table> |
467 </table> |
610 <tr><td>None</td></tr> |
|
611 </table> |
|
612 |
468 <a NAME="Module.__init__" ID="Module.__init__"></a> |
613 <a NAME="Module.__init__" ID="Module.__init__"></a> |
469 <h4>Module (Constructor)</h4> |
614 <h4>Module (Constructor)</h4> |
470 <b>Module</b>(<i>name, file=None, moduleType=None</i>) |
615 <b>Module</b>(<i>name, file=None, moduleType=None</i>) |
|
616 |
471 <p> |
617 <p> |
472 Constructor |
618 Constructor |
473 </p><dl> |
619 </p> |
|
620 <dl> |
|
621 |
474 <dt><i>name</i></dt> |
622 <dt><i>name</i></dt> |
475 <dd> |
623 <dd> |
476 name of this module (string) |
624 name of this module (string) |
477 </dd><dt><i>file</i></dt> |
625 </dd> |
|
626 <dt><i>file</i></dt> |
478 <dd> |
627 <dd> |
479 filename of file containing this module (string) |
628 filename of file containing this module (string) |
480 </dd><dt><i>moduleType</i></dt> |
629 </dd> |
|
630 <dt><i>moduleType</i></dt> |
481 <dd> |
631 <dd> |
482 type of this module |
632 type of this module |
483 </dd> |
633 </dd> |
484 </dl><a NAME="Module.__py_scan" ID="Module.__py_scan"></a> |
634 </dl> |
|
635 <a NAME="Module.__py_scan" ID="Module.__py_scan"></a> |
485 <h4>Module.__py_scan</h4> |
636 <h4>Module.__py_scan</h4> |
486 <b>__py_scan</b>(<i>src</i>) |
637 <b>__py_scan</b>(<i>src</i>) |
|
638 |
487 <p> |
639 <p> |
488 Private method to scan the source text of a Python module and retrieve |
640 Private method to scan the source text of a Python module and retrieve |
489 the relevant information. |
641 the relevant information. |
490 </p><dl> |
642 </p> |
|
643 <dl> |
|
644 |
491 <dt><i>src</i></dt> |
645 <dt><i>src</i></dt> |
492 <dd> |
646 <dd> |
493 the source text to be scanned (string) |
647 the source text to be scanned (string) |
494 </dd> |
648 </dd> |
495 </dl><a NAME="Module.__py_setVisibility" ID="Module.__py_setVisibility"></a> |
649 </dl> |
|
650 <a NAME="Module.__py_setVisibility" ID="Module.__py_setVisibility"></a> |
496 <h4>Module.__py_setVisibility</h4> |
651 <h4>Module.__py_setVisibility</h4> |
497 <b>__py_setVisibility</b>(<i>objectRef</i>) |
652 <b>__py_setVisibility</b>(<i>objectRef</i>) |
|
653 |
498 <p> |
654 <p> |
499 Private method to set the visibility of an object. |
655 Private method to set the visibility of an object. |
500 </p><dl> |
656 </p> |
|
657 <dl> |
|
658 |
501 <dt><i>objectRef</i></dt> |
659 <dt><i>objectRef</i></dt> |
502 <dd> |
660 <dd> |
503 reference to the object (Attribute, Class or Function) |
661 reference to the object (Attribute, Class or Function) |
504 </dd> |
662 </dd> |
505 </dl><a NAME="Module.__rb_scan" ID="Module.__rb_scan"></a> |
663 </dl> |
|
664 <a NAME="Module.__rb_scan" ID="Module.__rb_scan"></a> |
506 <h4>Module.__rb_scan</h4> |
665 <h4>Module.__rb_scan</h4> |
507 <b>__rb_scan</b>(<i>src</i>) |
666 <b>__rb_scan</b>(<i>src</i>) |
|
667 |
508 <p> |
668 <p> |
509 Private method to scan the source text of a Python module and retrieve |
669 Private method to scan the source text of a Python module and retrieve |
510 the relevant information. |
670 the relevant information. |
511 </p><dl> |
671 </p> |
|
672 <dl> |
|
673 |
512 <dt><i>src</i></dt> |
674 <dt><i>src</i></dt> |
513 <dd> |
675 <dd> |
514 the source text to be scanned (string) |
676 the source text to be scanned (string) |
515 </dd> |
677 </dd> |
516 </dl><a NAME="Module.addClass" ID="Module.addClass"></a> |
678 </dl> |
|
679 <a NAME="Module.addClass" ID="Module.addClass"></a> |
517 <h4>Module.addClass</h4> |
680 <h4>Module.addClass</h4> |
518 <b>addClass</b>(<i>name, _class</i>) |
681 <b>addClass</b>(<i>name, _class</i>) |
|
682 |
519 <p> |
683 <p> |
520 Public method to add information about a class. |
684 Public method to add information about a class. |
521 </p><dl> |
685 </p> |
|
686 <dl> |
|
687 |
522 <dt><i>name</i></dt> |
688 <dt><i>name</i></dt> |
523 <dd> |
689 <dd> |
524 name of class to be added (string) |
690 name of class to be added (string) |
525 </dd><dt><i>_class</i></dt> |
691 </dd> |
|
692 <dt><i>_class</i></dt> |
526 <dd> |
693 <dd> |
527 Class object to be added |
694 Class object to be added |
528 </dd> |
695 </dd> |
529 </dl><a NAME="Module.addDescription" ID="Module.addDescription"></a> |
696 </dl> |
|
697 <a NAME="Module.addDescription" ID="Module.addDescription"></a> |
530 <h4>Module.addDescription</h4> |
698 <h4>Module.addDescription</h4> |
531 <b>addDescription</b>(<i>description</i>) |
699 <b>addDescription</b>(<i>description</i>) |
|
700 |
532 <p> |
701 <p> |
533 Public method to store the modules docstring. |
702 Public method to store the modules docstring. |
534 </p><dl> |
703 </p> |
|
704 <dl> |
|
705 |
535 <dt><i>description</i></dt> |
706 <dt><i>description</i></dt> |
536 <dd> |
707 <dd> |
537 the docstring to be stored (string) |
708 the docstring to be stored (string) |
538 </dd> |
709 </dd> |
539 </dl><a NAME="Module.addFunction" ID="Module.addFunction"></a> |
710 </dl> |
|
711 <a NAME="Module.addFunction" ID="Module.addFunction"></a> |
540 <h4>Module.addFunction</h4> |
712 <h4>Module.addFunction</h4> |
541 <b>addFunction</b>(<i>name, function</i>) |
713 <b>addFunction</b>(<i>name, function</i>) |
|
714 |
542 <p> |
715 <p> |
543 Public method to add information about a function. |
716 Public method to add information about a function. |
544 </p><dl> |
717 </p> |
|
718 <dl> |
|
719 |
545 <dt><i>name</i></dt> |
720 <dt><i>name</i></dt> |
546 <dd> |
721 <dd> |
547 name of function to be added (string) |
722 name of function to be added (string) |
548 </dd><dt><i>function</i></dt> |
723 </dd> |
|
724 <dt><i>function</i></dt> |
549 <dd> |
725 <dd> |
550 Function object to be added |
726 Function object to be added |
551 </dd> |
727 </dd> |
552 </dl><a NAME="Module.addGlobal" ID="Module.addGlobal"></a> |
728 </dl> |
|
729 <a NAME="Module.addGlobal" ID="Module.addGlobal"></a> |
553 <h4>Module.addGlobal</h4> |
730 <h4>Module.addGlobal</h4> |
554 <b>addGlobal</b>(<i>name, attr</i>) |
731 <b>addGlobal</b>(<i>name, attr</i>) |
|
732 |
555 <p> |
733 <p> |
556 Public method to add information about global variables. |
734 Public method to add information about global variables. |
557 </p><dl> |
735 </p> |
|
736 <dl> |
|
737 |
558 <dt><i>name</i></dt> |
738 <dt><i>name</i></dt> |
559 <dd> |
739 <dd> |
560 name of the global to add (string) |
740 name of the global to add (string) |
561 </dd><dt><i>attr</i></dt> |
741 </dd> |
|
742 <dt><i>attr</i></dt> |
562 <dd> |
743 <dd> |
563 Attribute object to be added |
744 Attribute object to be added |
564 </dd> |
745 </dd> |
565 </dl><a NAME="Module.addModule" ID="Module.addModule"></a> |
746 </dl> |
|
747 <a NAME="Module.addModule" ID="Module.addModule"></a> |
566 <h4>Module.addModule</h4> |
748 <h4>Module.addModule</h4> |
567 <b>addModule</b>(<i>name, module</i>) |
749 <b>addModule</b>(<i>name, module</i>) |
|
750 |
568 <p> |
751 <p> |
569 Public method to add information about a Ruby module. |
752 Public method to add information about a Ruby module. |
570 </p><dl> |
753 </p> |
|
754 <dl> |
|
755 |
571 <dt><i>name</i></dt> |
756 <dt><i>name</i></dt> |
572 <dd> |
757 <dd> |
573 name of module to be added (string) |
758 name of module to be added (string) |
574 </dd><dt><i>module</i></dt> |
759 </dd> |
|
760 <dt><i>module</i></dt> |
575 <dd> |
761 <dd> |
576 Module object to be added |
762 Module object to be added |
577 </dd> |
763 </dd> |
578 </dl><a NAME="Module.addPathToHierarchy" ID="Module.addPathToHierarchy"></a> |
764 </dl> |
|
765 <a NAME="Module.addPathToHierarchy" ID="Module.addPathToHierarchy"></a> |
579 <h4>Module.addPathToHierarchy</h4> |
766 <h4>Module.addPathToHierarchy</h4> |
580 <b>addPathToHierarchy</b>(<i>path, result, fn</i>) |
767 <b>addPathToHierarchy</b>(<i>path, result, fn</i>) |
|
768 |
581 <p> |
769 <p> |
582 Public method to put the exhausted path into the result dictionary. |
770 Public method to put the exhausted path into the result dictionary. |
583 </p><dl> |
771 </p> |
|
772 <dl> |
|
773 |
584 <dt><i>path</i></dt> |
774 <dt><i>path</i></dt> |
585 <dd> |
775 <dd> |
586 the exhausted path of classes |
776 the exhausted path of classes |
587 </dd><dt><i>result</i></dt> |
777 </dd> |
|
778 <dt><i>result</i></dt> |
588 <dd> |
779 <dd> |
589 the result dictionary |
780 the result dictionary |
590 </dd><dt><i>fn</i></dt> |
781 </dd> |
|
782 <dt><i>fn</i></dt> |
591 <dd> |
783 <dd> |
592 function to call for classe that are already part of the |
784 function to call for classe that are already part of the |
593 result dictionary |
785 result dictionary |
594 </dd> |
786 </dd> |
595 </dl><a NAME="Module.assembleHierarchy" ID="Module.assembleHierarchy"></a> |
787 </dl> |
|
788 <a NAME="Module.assembleHierarchy" ID="Module.assembleHierarchy"></a> |
596 <h4>Module.assembleHierarchy</h4> |
789 <h4>Module.assembleHierarchy</h4> |
597 <b>assembleHierarchy</b>(<i>name, classes, path, result</i>) |
790 <b>assembleHierarchy</b>(<i>name, classes, path, result</i>) |
|
791 |
598 <p> |
792 <p> |
599 Public method to assemble the inheritance hierarchy. |
793 Public method to assemble the inheritance hierarchy. |
600 </p><p> |
794 </p> |
|
795 <p> |
601 This method will traverse the class hierarchy, from a given class |
796 This method will traverse the class hierarchy, from a given class |
602 and build up a nested dictionary of super-classes. The result is |
797 and build up a nested dictionary of super-classes. The result is |
603 intended to be inverted, i.e. the highest level are the super classes. |
798 intended to be inverted, i.e. the highest level are the super classes. |
604 </p><p> |
799 </p> |
|
800 <p> |
605 This code is borrowed from Boa Constructor. |
801 This code is borrowed from Boa Constructor. |
606 </p><dl> |
802 </p> |
|
803 <dl> |
|
804 |
607 <dt><i>name</i></dt> |
805 <dt><i>name</i></dt> |
608 <dd> |
806 <dd> |
609 name of class to assemble hierarchy (string) |
807 name of class to assemble hierarchy (string) |
610 </dd><dt><i>classes</i></dt> |
808 </dd> |
|
809 <dt><i>classes</i></dt> |
611 <dd> |
810 <dd> |
612 A dictionary of classes to look in. |
811 A dictionary of classes to look in. |
613 </dd><dt><i>path</i></dt> |
812 </dd> |
614 <dd> |
813 <dt><i>path</i></dt> |
615 |
814 <dd> |
616 </dd><dt><i>result</i></dt> |
815 |
|
816 </dd> |
|
817 <dt><i>result</i></dt> |
617 <dd> |
818 <dd> |
618 The resultant hierarchy |
819 The resultant hierarchy |
619 </dd> |
820 </dd> |
620 </dl><a NAME="Module.createHierarchy" ID="Module.createHierarchy"></a> |
821 </dl> |
|
822 <a NAME="Module.createHierarchy" ID="Module.createHierarchy"></a> |
621 <h4>Module.createHierarchy</h4> |
823 <h4>Module.createHierarchy</h4> |
622 <b>createHierarchy</b>(<i></i>) |
824 <b>createHierarchy</b>(<i></i>) |
|
825 |
623 <p> |
826 <p> |
624 Public method to build the inheritance hierarchy for all classes of |
827 Public method to build the inheritance hierarchy for all classes of |
625 this module. |
828 this module. |
626 </p><dl> |
829 </p> |
|
830 <dl> |
627 <dt>Returns:</dt> |
831 <dt>Returns:</dt> |
628 <dd> |
832 <dd> |
629 A dictionary with inheritance hierarchies. |
833 A dictionary with inheritance hierarchies. |
630 </dd> |
834 </dd> |
631 </dl><a NAME="Module.getFileName" ID="Module.getFileName"></a> |
835 </dl> |
|
836 <a NAME="Module.getFileName" ID="Module.getFileName"></a> |
632 <h4>Module.getFileName</h4> |
837 <h4>Module.getFileName</h4> |
633 <b>getFileName</b>(<i></i>) |
838 <b>getFileName</b>(<i></i>) |
|
839 |
634 <p> |
840 <p> |
635 Public method to retrieve the modules filename. |
841 Public method to retrieve the modules filename. |
636 </p><dl> |
842 </p> |
|
843 <dl> |
637 <dt>Returns:</dt> |
844 <dt>Returns:</dt> |
638 <dd> |
845 <dd> |
639 module filename (string) |
846 module filename (string) |
640 </dd> |
847 </dd> |
641 </dl><a NAME="Module.getName" ID="Module.getName"></a> |
848 </dl> |
|
849 <a NAME="Module.getName" ID="Module.getName"></a> |
642 <h4>Module.getName</h4> |
850 <h4>Module.getName</h4> |
643 <b>getName</b>(<i></i>) |
851 <b>getName</b>(<i></i>) |
|
852 |
644 <p> |
853 <p> |
645 Public method to retrieve the modules name. |
854 Public method to retrieve the modules name. |
646 </p><dl> |
855 </p> |
|
856 <dl> |
647 <dt>Returns:</dt> |
857 <dt>Returns:</dt> |
648 <dd> |
858 <dd> |
649 module name (string) |
859 module name (string) |
650 </dd> |
860 </dd> |
651 </dl><a NAME="Module.getType" ID="Module.getType"></a> |
861 </dl> |
|
862 <a NAME="Module.getType" ID="Module.getType"></a> |
652 <h4>Module.getType</h4> |
863 <h4>Module.getType</h4> |
653 <b>getType</b>(<i></i>) |
864 <b>getType</b>(<i></i>) |
|
865 |
654 <p> |
866 <p> |
655 Public method to get the type of the module's source. |
867 Public method to get the type of the module's source. |
656 </p><dl> |
868 </p> |
|
869 <dl> |
657 <dt>Returns:</dt> |
870 <dt>Returns:</dt> |
658 <dd> |
871 <dd> |
659 type of the modules's source (string) |
872 type of the modules's source (string) |
660 </dd> |
873 </dd> |
661 </dl><a NAME="Module.scan" ID="Module.scan"></a> |
874 </dl> |
|
875 <a NAME="Module.scan" ID="Module.scan"></a> |
662 <h4>Module.scan</h4> |
876 <h4>Module.scan</h4> |
663 <b>scan</b>(<i>src</i>) |
877 <b>scan</b>(<i>src</i>) |
|
878 |
664 <p> |
879 <p> |
665 Public method to scan the source text and retrieve the relevant |
880 Public method to scan the source text and retrieve the relevant |
666 information. |
881 information. |
667 </p><dl> |
882 </p> |
|
883 <dl> |
|
884 |
668 <dt><i>src</i></dt> |
885 <dt><i>src</i></dt> |
669 <dd> |
886 <dd> |
670 the source text to be scanned (string) |
887 the source text to be scanned (string) |
671 </dd> |
888 </dd> |
672 </dl> |
889 </dl> |
673 <div align="right"><a href="#top">Up</a></div> |
890 <div align="right"><a href="#top">Up</a></div> |
674 <hr /><hr /> |
891 <hr /> |
|
892 <hr /> |
675 <a NAME="RbModule" ID="RbModule"></a> |
893 <a NAME="RbModule" ID="RbModule"></a> |
676 <h2>RbModule</h2> |
894 <h2>RbModule</h2> |
|
895 |
677 <p> |
896 <p> |
678 Class to represent a Ruby module. |
897 Class to represent a Ruby module. |
679 </p> |
898 </p> |
680 <h3>Derived from</h3> |
899 <h3>Derived from</h3> |
681 Class |
900 Class |
682 <h3>Class Attributes</h3> |
901 <h3>Class Attributes</h3> |
|
902 |
683 <table> |
903 <table> |
684 <tr><td>None</td></tr> |
904 <tr><td>None</td></tr> |
685 </table> |
905 </table> |
686 <h3>Class Methods</h3> |
906 <h3>Class Methods</h3> |
|
907 |
687 <table> |
908 <table> |
688 <tr><td>None</td></tr> |
909 <tr><td>None</td></tr> |
689 </table> |
910 </table> |
690 <h3>Methods</h3> |
911 <h3>Methods</h3> |
691 <table> |
912 |
|
913 <table> |
|
914 |
692 <tr> |
915 <tr> |
693 <td><a href="#RbModule.__init__">RbModule</a></td> |
916 <td><a href="#RbModule.__init__">RbModule</a></td> |
694 <td>Constructor</td> |
917 <td>Constructor</td> |
695 </tr><tr> |
918 </tr> |
|
919 <tr> |
696 <td><a href="#RbModule.addClass">addClass</a></td> |
920 <td><a href="#RbModule.addClass">addClass</a></td> |
697 <td>Public method to add information about a class.</td> |
921 <td>Public method to add information about a class.</td> |
698 </tr> |
922 </tr> |
699 </table> |
923 </table> |
700 <h3>Static Methods</h3> |
924 <h3>Static Methods</h3> |
701 <table> |
925 |
702 <tr><td>None</td></tr> |
926 <table> |
703 </table> |
927 <tr><td>None</td></tr> |
|
928 </table> |
|
929 |
704 <a NAME="RbModule.__init__" ID="RbModule.__init__"></a> |
930 <a NAME="RbModule.__init__" ID="RbModule.__init__"></a> |
705 <h4>RbModule (Constructor)</h4> |
931 <h4>RbModule (Constructor)</h4> |
706 <b>RbModule</b>(<i>module, name, file, lineno</i>) |
932 <b>RbModule</b>(<i>module, name, file, lineno</i>) |
|
933 |
707 <p> |
934 <p> |
708 Constructor |
935 Constructor |
709 </p><dl> |
936 </p> |
|
937 <dl> |
|
938 |
710 <dt><i>module</i></dt> |
939 <dt><i>module</i></dt> |
711 <dd> |
940 <dd> |
712 name of module containing this class (string) |
941 name of module containing this class (string) |
713 </dd><dt><i>name</i></dt> |
942 </dd> |
|
943 <dt><i>name</i></dt> |
714 <dd> |
944 <dd> |
715 name of the class (string) |
945 name of the class (string) |
716 </dd><dt><i>file</i></dt> |
946 </dd> |
|
947 <dt><i>file</i></dt> |
717 <dd> |
948 <dd> |
718 name of file containing this class (string) |
949 name of file containing this class (string) |
719 </dd><dt><i>lineno</i></dt> |
950 </dd> |
|
951 <dt><i>lineno</i></dt> |
720 <dd> |
952 <dd> |
721 linenumber of the class definition (integer) |
953 linenumber of the class definition (integer) |
722 </dd> |
954 </dd> |
723 </dl><a NAME="RbModule.addClass" ID="RbModule.addClass"></a> |
955 </dl> |
|
956 <a NAME="RbModule.addClass" ID="RbModule.addClass"></a> |
724 <h4>RbModule.addClass</h4> |
957 <h4>RbModule.addClass</h4> |
725 <b>addClass</b>(<i>name, _class</i>) |
958 <b>addClass</b>(<i>name, _class</i>) |
|
959 |
726 <p> |
960 <p> |
727 Public method to add information about a class. |
961 Public method to add information about a class. |
728 </p><dl> |
962 </p> |
|
963 <dl> |
|
964 |
729 <dt><i>name</i></dt> |
965 <dt><i>name</i></dt> |
730 <dd> |
966 <dd> |
731 name of class to be added (string) |
967 name of class to be added (string) |
732 </dd><dt><i>_class</i></dt> |
968 </dd> |
|
969 <dt><i>_class</i></dt> |
733 <dd> |
970 <dd> |
734 Class object to be added |
971 Class object to be added |
735 </dd> |
972 </dd> |
736 </dl> |
973 </dl> |
737 <div align="right"><a href="#top">Up</a></div> |
974 <div align="right"><a href="#top">Up</a></div> |
738 <hr /><hr /> |
975 <hr /> |
|
976 <hr /> |
739 <a NAME="VisibilityBase" ID="VisibilityBase"></a> |
977 <a NAME="VisibilityBase" ID="VisibilityBase"></a> |
740 <h2>VisibilityBase</h2> |
978 <h2>VisibilityBase</h2> |
|
979 |
741 <p> |
980 <p> |
742 Class implementing the visibility aspect of all objects. |
981 Class implementing the visibility aspect of all objects. |
743 </p> |
982 </p> |
744 <h3>Derived from</h3> |
983 <h3>Derived from</h3> |
745 object |
984 object |
746 <h3>Class Attributes</h3> |
985 <h3>Class Attributes</h3> |
|
986 |
747 <table> |
987 <table> |
748 <tr><td>None</td></tr> |
988 <tr><td>None</td></tr> |
749 </table> |
989 </table> |
750 <h3>Class Methods</h3> |
990 <h3>Class Methods</h3> |
|
991 |
751 <table> |
992 <table> |
752 <tr><td>None</td></tr> |
993 <tr><td>None</td></tr> |
753 </table> |
994 </table> |
754 <h3>Methods</h3> |
995 <h3>Methods</h3> |
755 <table> |
996 |
|
997 <table> |
|
998 |
756 <tr> |
999 <tr> |
757 <td><a href="#VisibilityBase.isPrivate">isPrivate</a></td> |
1000 <td><a href="#VisibilityBase.isPrivate">isPrivate</a></td> |
758 <td>Public method to check, if the visibility is Private.</td> |
1001 <td>Public method to check, if the visibility is Private.</td> |
759 </tr><tr> |
1002 </tr> |
|
1003 <tr> |
760 <td><a href="#VisibilityBase.isProtected">isProtected</a></td> |
1004 <td><a href="#VisibilityBase.isProtected">isProtected</a></td> |
761 <td>Public method to check, if the visibility is Protected.</td> |
1005 <td>Public method to check, if the visibility is Protected.</td> |
762 </tr><tr> |
1006 </tr> |
|
1007 <tr> |
763 <td><a href="#VisibilityBase.isPublic">isPublic</a></td> |
1008 <td><a href="#VisibilityBase.isPublic">isPublic</a></td> |
764 <td>Public method to check, if the visibility is Public.</td> |
1009 <td>Public method to check, if the visibility is Public.</td> |
765 </tr><tr> |
1010 </tr> |
|
1011 <tr> |
766 <td><a href="#VisibilityBase.setPrivate">setPrivate</a></td> |
1012 <td><a href="#VisibilityBase.setPrivate">setPrivate</a></td> |
767 <td>Public method to set the visibility to Private.</td> |
1013 <td>Public method to set the visibility to Private.</td> |
768 </tr><tr> |
1014 </tr> |
|
1015 <tr> |
769 <td><a href="#VisibilityBase.setProtected">setProtected</a></td> |
1016 <td><a href="#VisibilityBase.setProtected">setProtected</a></td> |
770 <td>Public method to set the visibility to Protected.</td> |
1017 <td>Public method to set the visibility to Protected.</td> |
771 </tr><tr> |
1018 </tr> |
|
1019 <tr> |
772 <td><a href="#VisibilityBase.setPublic">setPublic</a></td> |
1020 <td><a href="#VisibilityBase.setPublic">setPublic</a></td> |
773 <td>Public method to set the visibility to Public.</td> |
1021 <td>Public method to set the visibility to Public.</td> |
774 </tr> |
1022 </tr> |
775 </table> |
1023 </table> |
776 <h3>Static Methods</h3> |
1024 <h3>Static Methods</h3> |
777 <table> |
1025 |
778 <tr><td>None</td></tr> |
1026 <table> |
779 </table> |
1027 <tr><td>None</td></tr> |
|
1028 </table> |
|
1029 |
780 <a NAME="VisibilityBase.isPrivate" ID="VisibilityBase.isPrivate"></a> |
1030 <a NAME="VisibilityBase.isPrivate" ID="VisibilityBase.isPrivate"></a> |
781 <h4>VisibilityBase.isPrivate</h4> |
1031 <h4>VisibilityBase.isPrivate</h4> |
782 <b>isPrivate</b>(<i></i>) |
1032 <b>isPrivate</b>(<i></i>) |
|
1033 |
783 <p> |
1034 <p> |
784 Public method to check, if the visibility is Private. |
1035 Public method to check, if the visibility is Private. |
785 </p><dl> |
1036 </p> |
|
1037 <dl> |
786 <dt>Returns:</dt> |
1038 <dt>Returns:</dt> |
787 <dd> |
1039 <dd> |
788 flag indicating Private visibility (boolean) |
1040 flag indicating Private visibility (boolean) |
789 </dd> |
1041 </dd> |
790 </dl><a NAME="VisibilityBase.isProtected" ID="VisibilityBase.isProtected"></a> |
1042 </dl> |
|
1043 <a NAME="VisibilityBase.isProtected" ID="VisibilityBase.isProtected"></a> |
791 <h4>VisibilityBase.isProtected</h4> |
1044 <h4>VisibilityBase.isProtected</h4> |
792 <b>isProtected</b>(<i></i>) |
1045 <b>isProtected</b>(<i></i>) |
|
1046 |
793 <p> |
1047 <p> |
794 Public method to check, if the visibility is Protected. |
1048 Public method to check, if the visibility is Protected. |
795 </p><dl> |
1049 </p> |
|
1050 <dl> |
796 <dt>Returns:</dt> |
1051 <dt>Returns:</dt> |
797 <dd> |
1052 <dd> |
798 flag indicating Protected visibility (boolean) |
1053 flag indicating Protected visibility (boolean) |
799 </dd> |
1054 </dd> |
800 </dl><a NAME="VisibilityBase.isPublic" ID="VisibilityBase.isPublic"></a> |
1055 </dl> |
|
1056 <a NAME="VisibilityBase.isPublic" ID="VisibilityBase.isPublic"></a> |
801 <h4>VisibilityBase.isPublic</h4> |
1057 <h4>VisibilityBase.isPublic</h4> |
802 <b>isPublic</b>(<i></i>) |
1058 <b>isPublic</b>(<i></i>) |
|
1059 |
803 <p> |
1060 <p> |
804 Public method to check, if the visibility is Public. |
1061 Public method to check, if the visibility is Public. |
805 </p><dl> |
1062 </p> |
|
1063 <dl> |
806 <dt>Returns:</dt> |
1064 <dt>Returns:</dt> |
807 <dd> |
1065 <dd> |
808 flag indicating Public visibility (boolean) |
1066 flag indicating Public visibility (boolean) |
809 </dd> |
1067 </dd> |
810 </dl><a NAME="VisibilityBase.setPrivate" ID="VisibilityBase.setPrivate"></a> |
1068 </dl> |
|
1069 <a NAME="VisibilityBase.setPrivate" ID="VisibilityBase.setPrivate"></a> |
811 <h4>VisibilityBase.setPrivate</h4> |
1070 <h4>VisibilityBase.setPrivate</h4> |
812 <b>setPrivate</b>(<i></i>) |
1071 <b>setPrivate</b>(<i></i>) |
|
1072 |
813 <p> |
1073 <p> |
814 Public method to set the visibility to Private. |
1074 Public method to set the visibility to Private. |
815 </p><a NAME="VisibilityBase.setProtected" ID="VisibilityBase.setProtected"></a> |
1075 </p> |
|
1076 <a NAME="VisibilityBase.setProtected" ID="VisibilityBase.setProtected"></a> |
816 <h4>VisibilityBase.setProtected</h4> |
1077 <h4>VisibilityBase.setProtected</h4> |
817 <b>setProtected</b>(<i></i>) |
1078 <b>setProtected</b>(<i></i>) |
|
1079 |
818 <p> |
1080 <p> |
819 Public method to set the visibility to Protected. |
1081 Public method to set the visibility to Protected. |
820 </p><a NAME="VisibilityBase.setPublic" ID="VisibilityBase.setPublic"></a> |
1082 </p> |
|
1083 <a NAME="VisibilityBase.setPublic" ID="VisibilityBase.setPublic"></a> |
821 <h4>VisibilityBase.setPublic</h4> |
1084 <h4>VisibilityBase.setPublic</h4> |
822 <b>setPublic</b>(<i></i>) |
1085 <b>setPublic</b>(<i></i>) |
|
1086 |
823 <p> |
1087 <p> |
824 Public method to set the visibility to Public. |
1088 Public method to set the visibility to Public. |
825 </p> |
1089 </p> |
826 <div align="right"><a href="#top">Up</a></div> |
1090 <div align="right"><a href="#top">Up</a></div> |
827 <hr /><hr /> |
1091 <hr /> |
|
1092 <hr /> |
828 <a NAME="_indent" ID="_indent"></a> |
1093 <a NAME="_indent" ID="_indent"></a> |
829 <h2>_indent</h2> |
1094 <h2>_indent</h2> |
830 <b>_indent</b>(<i>ws</i>) |
1095 <b>_indent</b>(<i>ws</i>) |
|
1096 |
831 <p> |
1097 <p> |
832 Protected function to determine the indent width of a whitespace string. |
1098 Protected function to determine the indent width of a whitespace string. |
833 </p><dl> |
1099 </p> |
|
1100 <dl> |
|
1101 |
834 <dt><i>ws</i></dt> |
1102 <dt><i>ws</i></dt> |
835 <dd> |
1103 <dd> |
836 The whitespace string to be cheked. (string) |
1104 The whitespace string to be cheked. (string) |
837 </dd> |
1105 </dd> |
838 </dl><dl> |
1106 </dl> |
|
1107 <dl> |
839 <dt>Returns:</dt> |
1108 <dt>Returns:</dt> |
840 <dd> |
1109 <dd> |
841 Length of the whitespace string after tab expansion. |
1110 Length of the whitespace string after tab expansion. |
842 </dd> |
1111 </dd> |
843 </dl> |
1112 </dl> |
844 <div align="right"><a href="#top">Up</a></div> |
1113 <div align="right"><a href="#top">Up</a></div> |
845 <hr /><hr /> |
1114 <hr /> |
|
1115 <hr /> |
846 <a NAME="find_module" ID="find_module"></a> |
1116 <a NAME="find_module" ID="find_module"></a> |
847 <h2>find_module</h2> |
1117 <h2>find_module</h2> |
848 <b>find_module</b>(<i>name, path, extensions</i>) |
1118 <b>find_module</b>(<i>name, path, extensions</i>) |
|
1119 |
849 <p> |
1120 <p> |
850 Module function to extend the Python module finding mechanism. |
1121 Module function to extend the Python module finding mechanism. |
851 </p><p> |
1122 </p> |
|
1123 <p> |
852 This function searches for files in the given path. If the filename |
1124 This function searches for files in the given path. If the filename |
853 doesn't have an extension or an extension of .py, the normal search |
1125 doesn't have an extension or an extension of .py, the normal search |
854 implemented in the imp module is used. For all other supported files |
1126 implemented in the imp module is used. For all other supported files |
855 only path is searched. |
1127 only path is searched. |
856 </p><dl> |
1128 </p> |
|
1129 <dl> |
|
1130 |
857 <dt><i>name</i></dt> |
1131 <dt><i>name</i></dt> |
858 <dd> |
1132 <dd> |
859 filename or modulename to search for (string) |
1133 filename or modulename to search for (string) |
860 </dd><dt><i>path</i></dt> |
1134 </dd> |
|
1135 <dt><i>path</i></dt> |
861 <dd> |
1136 <dd> |
862 search path (list of strings) |
1137 search path (list of strings) |
863 </dd><dt><i>extensions</i></dt> |
1138 </dd> |
|
1139 <dt><i>extensions</i></dt> |
864 <dd> |
1140 <dd> |
865 list of extensions, which should be considered valid |
1141 list of extensions, which should be considered valid |
866 source file extensions (list of strings) |
1142 source file extensions (list of strings) |
867 </dd> |
1143 </dd> |
868 </dl><dl> |
1144 </dl> |
|
1145 <dl> |
869 <dt>Returns:</dt> |
1146 <dt>Returns:</dt> |
870 <dd> |
1147 <dd> |
871 tuple of the open file, pathname and description. Description |
1148 tuple of the open file, pathname and description. Description |
872 is a tuple of file suffix, file mode and file type) |
1149 is a tuple of file suffix, file mode and file type) |
873 </dd> |
1150 </dd> |
874 </dl><dl> |
1151 </dl> |
|
1152 <dl> |
|
1153 |
875 <dt>Raises <b>ImportError</b>:</dt> |
1154 <dt>Raises <b>ImportError</b>:</dt> |
876 <dd> |
1155 <dd> |
877 The file or module wasn't found. |
1156 The file or module wasn't found. |
878 </dd> |
1157 </dd> |
879 </dl> |
1158 </dl> |
880 <div align="right"><a href="#top">Up</a></div> |
1159 <div align="right"><a href="#top">Up</a></div> |
881 <hr /><hr /> |
1160 <hr /> |
|
1161 <hr /> |
882 <a NAME="getTypeFromTypeName" ID="getTypeFromTypeName"></a> |
1162 <a NAME="getTypeFromTypeName" ID="getTypeFromTypeName"></a> |
883 <h2>getTypeFromTypeName</h2> |
1163 <h2>getTypeFromTypeName</h2> |
884 <b>getTypeFromTypeName</b>(<i>name</i>) |
1164 <b>getTypeFromTypeName</b>(<i>name</i>) |
|
1165 |
885 <p> |
1166 <p> |
886 Module function to determine the module type given the module type name. |
1167 Module function to determine the module type given the module type name. |
887 </p><dl> |
1168 </p> |
|
1169 <dl> |
|
1170 |
888 <dt><i>name</i></dt> |
1171 <dt><i>name</i></dt> |
889 <dd> |
1172 <dd> |
890 module type name (string) |
1173 module type name (string) |
891 </dd> |
1174 </dd> |
892 </dl><dl> |
1175 </dl> |
|
1176 <dl> |
893 <dt>Returns:</dt> |
1177 <dt>Returns:</dt> |
894 <dd> |
1178 <dd> |
895 module type or -1 for failure (integer) |
1179 module type or -1 for failure (integer) |
896 </dd> |
1180 </dd> |
897 </dl> |
1181 </dl> |
898 <div align="right"><a href="#top">Up</a></div> |
1182 <div align="right"><a href="#top">Up</a></div> |
899 <hr /><hr /> |
1183 <hr /> |
|
1184 <hr /> |
900 <a NAME="readModule" ID="readModule"></a> |
1185 <a NAME="readModule" ID="readModule"></a> |
901 <h2>readModule</h2> |
1186 <h2>readModule</h2> |
902 <b>readModule</b>(<i>module, path=None, inpackage=False, basename="", extensions=None, caching=True, ignoreBuiltinModules=False</i>) |
1187 <b>readModule</b>(<i>module, path=None, inpackage=False, basename="", extensions=None, caching=True, ignoreBuiltinModules=False</i>) |
|
1188 |
903 <p> |
1189 <p> |
904 Function to read a module file and parse it. |
1190 Function to read a module file and parse it. |
905 </p><p> |
1191 </p> |
|
1192 <p> |
906 The module is searched in path and sys.path, read and parsed. |
1193 The module is searched in path and sys.path, read and parsed. |
907 If the module was parsed before, the information is taken |
1194 If the module was parsed before, the information is taken |
908 from a cache in order to speed up processing. |
1195 from a cache in order to speed up processing. |
909 </p><dl> |
1196 </p> |
|
1197 <dl> |
|
1198 |
910 <dt><i>module</i></dt> |
1199 <dt><i>module</i></dt> |
911 <dd> |
1200 <dd> |
912 name of the module to be parsed (string) |
1201 name of the module to be parsed (string) |
913 </dd><dt><i>path</i></dt> |
1202 </dd> |
|
1203 <dt><i>path</i></dt> |
914 <dd> |
1204 <dd> |
915 search path for the module (list of strings) |
1205 search path for the module (list of strings) |
916 </dd><dt><i>inpackage</i></dt> |
1206 </dd> |
|
1207 <dt><i>inpackage</i></dt> |
917 <dd> |
1208 <dd> |
918 flag indicating that module is inside a |
1209 flag indicating that module is inside a |
919 package (boolean) |
1210 package (boolean) |
920 </dd><dt><i>basename</i></dt> |
1211 </dd> |
|
1212 <dt><i>basename</i></dt> |
921 <dd> |
1213 <dd> |
922 a path basename that is deleted from the filename of |
1214 a path basename that is deleted from the filename of |
923 the module file to be read (string) |
1215 the module file to be read (string) |
924 </dd><dt><i>extensions</i></dt> |
1216 </dd> |
|
1217 <dt><i>extensions</i></dt> |
925 <dd> |
1218 <dd> |
926 list of extensions, which should be considered valid |
1219 list of extensions, which should be considered valid |
927 source file extensions (list of strings) |
1220 source file extensions (list of strings) |
928 </dd><dt><i>caching</i></dt> |
1221 </dd> |
|
1222 <dt><i>caching</i></dt> |
929 <dd> |
1223 <dd> |
930 flag indicating that the parsed module should be |
1224 flag indicating that the parsed module should be |
931 cached (boolean) |
1225 cached (boolean) |
932 </dd><dt><i>ignoreBuiltinModules</i></dt> |
1226 </dd> |
|
1227 <dt><i>ignoreBuiltinModules</i></dt> |
933 <dd> |
1228 <dd> |
934 flag indicating to ignore the builtin modules |
1229 flag indicating to ignore the builtin modules |
935 (boolean) |
1230 (boolean) |
936 </dd> |
1231 </dd> |
937 </dl><dl> |
1232 </dl> |
|
1233 <dl> |
938 <dt>Returns:</dt> |
1234 <dt>Returns:</dt> |
939 <dd> |
1235 <dd> |
940 reference to a Module object containing the parsed |
1236 reference to a Module object containing the parsed |
941 module information (Module) |
1237 module information (Module) |
942 </dd> |
1238 </dd> |
943 </dl> |
1239 </dl> |
944 <div align="right"><a href="#top">Up</a></div> |
1240 <div align="right"><a href="#top">Up</a></div> |
945 <hr /><hr /> |
1241 <hr /> |
|
1242 <hr /> |
946 <a NAME="resetParsedModule" ID="resetParsedModule"></a> |
1243 <a NAME="resetParsedModule" ID="resetParsedModule"></a> |
947 <h2>resetParsedModule</h2> |
1244 <h2>resetParsedModule</h2> |
948 <b>resetParsedModule</b>(<i>module, basename=""</i>) |
1245 <b>resetParsedModule</b>(<i>module, basename=""</i>) |
|
1246 |
949 <p> |
1247 <p> |
950 Module function to clear one module from the list of parsed modules. |
1248 Module function to clear one module from the list of parsed modules. |
951 </p><dl> |
1249 </p> |
|
1250 <dl> |
|
1251 |
952 <dt><i>module</i></dt> |
1252 <dt><i>module</i></dt> |
953 <dd> |
1253 <dd> |
954 Name of the module to be parsed (string) |
1254 Name of the module to be parsed (string) |
955 </dd><dt><i>basename</i></dt> |
1255 </dd> |
|
1256 <dt><i>basename</i></dt> |
956 <dd> |
1257 <dd> |
957 a path basename. This basename is deleted from |
1258 a path basename. This basename is deleted from |
958 the filename of the module file to be cleared. (string) |
1259 the filename of the module file to be cleared. (string) |
959 </dd> |
1260 </dd> |
960 </dl> |
1261 </dl> |
961 <div align="right"><a href="#top">Up</a></div> |
1262 <div align="right"><a href="#top">Up</a></div> |
962 <hr /><hr /> |
1263 <hr /> |
|
1264 <hr /> |
963 <a NAME="resetParsedModules" ID="resetParsedModules"></a> |
1265 <a NAME="resetParsedModules" ID="resetParsedModules"></a> |
964 <h2>resetParsedModules</h2> |
1266 <h2>resetParsedModules</h2> |
965 <b>resetParsedModules</b>(<i></i>) |
1267 <b>resetParsedModules</b>(<i></i>) |
|
1268 |
966 <p> |
1269 <p> |
967 Module function to reset the list of modules already parsed. |
1270 Module function to reset the list of modules already parsed. |
968 </p> |
1271 </p> |
969 <div align="right"><a href="#top">Up</a></div> |
1272 <div align="right"><a href="#top">Up</a></div> |
970 <hr /> |
1273 <hr /> |