20 </style> |
20 </style> |
21 </head> |
21 </head> |
22 <body><a NAME="top" ID="top"></a> |
22 <body><a NAME="top" ID="top"></a> |
23 <h1>eric5.Utilities.ModuleParser</h1> |
23 <h1>eric5.Utilities.ModuleParser</h1> |
24 <p> |
24 <p> |
25 Parse a Python module file. |
25 Parse a Python module file. |
26 </p><p> |
26 </p><p> |
27 This module is based on pyclbr.py as of Python 2.2.2 |
27 This module is based on pyclbr.py as of Python 2.2.2 |
28 </p><p> |
28 </p><p> |
29 <b>BUGS</b> (from pyclbr.py) |
29 <b>BUGS</b> (from pyclbr.py) |
30 <ul> |
30 <ul> |
31 <li>Code that doesn't pass tabnanny or python -t will confuse it, unless |
31 <li>Code that doesn't pass tabnanny or python -t will confuse it, unless |
32 you set the module TABWIDTH variable (default 8) to the correct tab width |
32 you set the module TABWIDTH variable (default 8) to the correct tab width |
33 for the file.</li> |
33 for the file.</li> |
34 </ul> |
34 </ul> |
35 </p> |
35 </p> |
36 <h3>Global Attributes</h3> |
36 <h3>Global Attributes</h3> |
37 <table> |
37 <table> |
38 <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>__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 <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>__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> |
39 </table> |
39 </table> |
40 <h3>Classes</h3> |
40 <h3>Classes</h3> |
41 <table> |
41 <table> |
42 <tr> |
42 <tr> |
43 <td><a href="#Attribute">Attribute</a></td> |
43 <td><a href="#Attribute">Attribute</a></td> |
44 <td>Class to represent a Python function or method.</td> |
44 <td>Class to represent a Python function or method.</td> |
45 </tr><tr> |
45 </tr><tr> |
46 <td><a href="#Class">Class</a></td> |
46 <td><a href="#Class">Class</a></td> |
47 <td>Class to represent a Python class.</td> |
47 <td>Class to represent a Python class.</td> |
48 </tr><tr> |
48 </tr><tr> |
49 <td><a href="#Function">Function</a></td> |
49 <td><a href="#Function">Function</a></td> |
50 <td>Class to represent a Python function or method.</td> |
50 <td>Class to represent a Python function or method.</td> |
51 </tr><tr> |
51 </tr><tr> |
52 <td><a href="#Module">Module</a></td> |
52 <td><a href="#Module">Module</a></td> |
53 <td>Class to represent a Python module.</td> |
53 <td>Class to represent a Python module.</td> |
54 </tr><tr> |
54 </tr><tr> |
55 <td><a href="#RbModule">RbModule</a></td> |
55 <td><a href="#RbModule">RbModule</a></td> |
56 <td>Class to represent a Ruby module.</td> |
56 <td>Class to represent a Ruby module.</td> |
57 </tr><tr> |
57 </tr><tr> |
58 <td><a href="#VisibilityBase">VisibilityBase</a></td> |
58 <td><a href="#VisibilityBase">VisibilityBase</a></td> |
59 <td>Class implementing the visibility aspect of all objects.</td> |
59 <td>Class implementing the visibility aspect of all objects.</td> |
60 </tr> |
60 </tr> |
61 </table> |
61 </table> |
62 <h3>Functions</h3> |
62 <h3>Functions</h3> |
63 <table> |
63 <table> |
64 <tr> |
64 <tr> |
65 <td><a href="#_indent">_indent</a></td> |
65 <td><a href="#_indent">_indent</a></td> |
66 <td>Protected function to determine the indent width of a whitespace string.</td> |
66 <td>Protected function to determine the indent width of a whitespace string.</td> |
67 </tr><tr> |
67 </tr><tr> |
68 <td><a href="#find_module">find_module</a></td> |
68 <td><a href="#find_module">find_module</a></td> |
69 <td>Module function to extend the Python module finding mechanism.</td> |
69 <td>Module function to extend the Python module finding mechanism.</td> |
70 </tr><tr> |
70 </tr><tr> |
71 <td><a href="#readModule">readModule</a></td> |
71 <td><a href="#readModule">readModule</a></td> |
72 <td>Function to read a module file and parse it.</td> |
72 <td>Function to read a module file and parse it.</td> |
73 </tr><tr> |
73 </tr><tr> |
74 <td><a href="#resetParsedModule">resetParsedModule</a></td> |
74 <td><a href="#resetParsedModule">resetParsedModule</a></td> |
75 <td>Module function to clear one module from the list of parsed modules.</td> |
75 <td>Module function to clear one module from the list of parsed modules.</td> |
76 </tr><tr> |
76 </tr><tr> |
77 <td><a href="#resetParsedModules">resetParsedModules</a></td> |
77 <td><a href="#resetParsedModules">resetParsedModules</a></td> |
78 <td>Module function to reset the list of modules already parsed.</td> |
78 <td>Module function to reset the list of modules already parsed.</td> |
79 </tr> |
79 </tr> |
80 </table> |
80 </table> |
81 <hr /><hr /> |
81 <hr /><hr /> |
82 <a NAME="Attribute" ID="Attribute"></a> |
82 <a NAME="Attribute" ID="Attribute"></a> |
83 <h2>Attribute</h2> |
83 <h2>Attribute</h2> |
84 <p> |
84 <p> |
85 Class to represent a Python function or method. |
85 Class to represent a Python function or method. |
86 </p> |
86 </p> |
87 <h3>Derived from</h3> |
87 <h3>Derived from</h3> |
88 VisibilityBase |
88 VisibilityBase |
89 <h3>Class Attributes</h3> |
89 <h3>Class Attributes</h3> |
90 <table> |
90 <table> |
132 </table> |
132 </table> |
133 <h3>Methods</h3> |
133 <h3>Methods</h3> |
134 <table> |
134 <table> |
135 <tr> |
135 <tr> |
136 <td><a href="#Class.__init__">Class</a></td> |
136 <td><a href="#Class.__init__">Class</a></td> |
137 <td>Constructor</td> |
137 <td>Constructor</td> |
138 </tr><tr> |
138 </tr><tr> |
139 <td><a href="#Class.addAttribute">addAttribute</a></td> |
139 <td><a href="#Class.addAttribute">addAttribute</a></td> |
140 <td>Public method to add information about attributes.</td> |
140 <td>Public method to add information about attributes.</td> |
141 </tr><tr> |
141 </tr><tr> |
142 <td><a href="#Class.addDescription">addDescription</a></td> |
142 <td><a href="#Class.addDescription">addDescription</a></td> |
143 <td>Public method to store the class docstring.</td> |
143 <td>Public method to store the class docstring.</td> |
144 </tr><tr> |
144 </tr><tr> |
145 <td><a href="#Class.addGlobal">addGlobal</a></td> |
145 <td><a href="#Class.addGlobal">addGlobal</a></td> |
146 <td>Public method to add information about global (class) variables.</td> |
146 <td>Public method to add information about global (class) variables.</td> |
147 </tr><tr> |
147 </tr><tr> |
148 <td><a href="#Class.addMethod">addMethod</a></td> |
148 <td><a href="#Class.addMethod">addMethod</a></td> |
149 <td>Public method to add information about a method.</td> |
149 <td>Public method to add information about a method.</td> |
150 </tr><tr> |
150 </tr><tr> |
151 <td><a href="#Class.getAttribute">getAttribute</a></td> |
151 <td><a href="#Class.getAttribute">getAttribute</a></td> |
152 <td>Public method to retrieve an attribute by name.</td> |
152 <td>Public method to retrieve an attribute by name.</td> |
153 </tr><tr> |
153 </tr><tr> |
154 <td><a href="#Class.getMethod">getMethod</a></td> |
154 <td><a href="#Class.getMethod">getMethod</a></td> |
155 <td>Public method to retrieve a method by name.</td> |
155 <td>Public method to retrieve a method by name.</td> |
156 </tr><tr> |
156 </tr><tr> |
157 <td><a href="#Class.setEndLine">setEndLine</a></td> |
157 <td><a href="#Class.setEndLine">setEndLine</a></td> |
158 <td>Public method to record the number of the last line of a class.</td> |
158 <td>Public method to record the number of the last line of a class.</td> |
159 </tr> |
159 </tr> |
160 </table> |
160 </table> |
161 <a NAME="Class.__init__" ID="Class.__init__"></a> |
161 <a NAME="Class.__init__" ID="Class.__init__"></a> |
162 <h4>Class (Constructor)</h4> |
162 <h4>Class (Constructor)</h4> |
163 <b>Class</b>(<i>module, name, super, file, lineno</i>) |
163 <b>Class</b>(<i>module, name, super, file, lineno</i>) |
164 <p> |
164 <p> |
165 Constructor |
165 Constructor |
166 </p><dl> |
166 </p><dl> |
167 <dt><i>module</i></dt> |
167 <dt><i>module</i></dt> |
168 <dd> |
168 <dd> |
169 name of module containing this class (string) |
169 name of module containing this class (string) |
170 </dd><dt><i>name</i></dt> |
170 </dd><dt><i>name</i></dt> |
171 <dd> |
171 <dd> |
172 name of the class (string) |
172 name of the class (string) |
173 </dd><dt><i>super</i></dt> |
173 </dd><dt><i>super</i></dt> |
174 <dd> |
174 <dd> |
175 list of classnames this class is inherited from |
175 list of classnames this class is inherited from |
176 (list of strings) |
176 (list of strings) |
177 </dd><dt><i>file</i></dt> |
177 </dd><dt><i>file</i></dt> |
178 <dd> |
178 <dd> |
179 name of file containing this class (string) |
179 name of file containing this class (string) |
180 </dd><dt><i>lineno</i></dt> |
180 </dd><dt><i>lineno</i></dt> |
181 <dd> |
181 <dd> |
182 linenumber of the class definition (integer) |
182 linenumber of the class definition (integer) |
183 </dd> |
183 </dd> |
184 </dl><a NAME="Class.addAttribute" ID="Class.addAttribute"></a> |
184 </dl><a NAME="Class.addAttribute" ID="Class.addAttribute"></a> |
185 <h4>Class.addAttribute</h4> |
185 <h4>Class.addAttribute</h4> |
186 <b>addAttribute</b>(<i>name, attr</i>) |
186 <b>addAttribute</b>(<i>name, attr</i>) |
187 <p> |
187 <p> |
188 Public method to add information about attributes. |
188 Public method to add information about attributes. |
189 </p><dl> |
189 </p><dl> |
190 <dt><i>name</i></dt> |
190 <dt><i>name</i></dt> |
191 <dd> |
191 <dd> |
192 name of the attribute to add (string) |
192 name of the attribute to add (string) |
193 </dd><dt><i>attr</i></dt> |
193 </dd><dt><i>attr</i></dt> |
194 <dd> |
194 <dd> |
195 Attribute object to be added |
195 Attribute object to be added |
196 </dd> |
196 </dd> |
197 </dl><a NAME="Class.addDescription" ID="Class.addDescription"></a> |
197 </dl><a NAME="Class.addDescription" ID="Class.addDescription"></a> |
198 <h4>Class.addDescription</h4> |
198 <h4>Class.addDescription</h4> |
199 <b>addDescription</b>(<i>description</i>) |
199 <b>addDescription</b>(<i>description</i>) |
200 <p> |
200 <p> |
201 Public method to store the class docstring. |
201 Public method to store the class docstring. |
202 </p><dl> |
202 </p><dl> |
203 <dt><i>description</i></dt> |
203 <dt><i>description</i></dt> |
204 <dd> |
204 <dd> |
205 the docstring to be stored (string) |
205 the docstring to be stored (string) |
206 </dd> |
206 </dd> |
207 </dl><a NAME="Class.addGlobal" ID="Class.addGlobal"></a> |
207 </dl><a NAME="Class.addGlobal" ID="Class.addGlobal"></a> |
208 <h4>Class.addGlobal</h4> |
208 <h4>Class.addGlobal</h4> |
209 <b>addGlobal</b>(<i>name, attr</i>) |
209 <b>addGlobal</b>(<i>name, attr</i>) |
210 <p> |
210 <p> |
211 Public method to add information about global (class) variables. |
211 Public method to add information about global (class) variables. |
212 </p><dl> |
212 </p><dl> |
213 <dt><i>name</i></dt> |
213 <dt><i>name</i></dt> |
214 <dd> |
214 <dd> |
215 name of the global to add (string) |
215 name of the global to add (string) |
216 </dd><dt><i>attr</i></dt> |
216 </dd><dt><i>attr</i></dt> |
217 <dd> |
217 <dd> |
218 Attribute object to be added |
218 Attribute object to be added |
219 </dd> |
219 </dd> |
220 </dl><a NAME="Class.addMethod" ID="Class.addMethod"></a> |
220 </dl><a NAME="Class.addMethod" ID="Class.addMethod"></a> |
221 <h4>Class.addMethod</h4> |
221 <h4>Class.addMethod</h4> |
222 <b>addMethod</b>(<i>name, function</i>) |
222 <b>addMethod</b>(<i>name, function</i>) |
223 <p> |
223 <p> |
224 Public method to add information about a method. |
224 Public method to add information about a method. |
225 </p><dl> |
225 </p><dl> |
226 <dt><i>name</i></dt> |
226 <dt><i>name</i></dt> |
227 <dd> |
227 <dd> |
228 name of method to be added (string) |
228 name of method to be added (string) |
229 </dd><dt><i>function</i></dt> |
229 </dd><dt><i>function</i></dt> |
230 <dd> |
230 <dd> |
231 Function object to be added |
231 Function object to be added |
232 </dd> |
232 </dd> |
233 </dl><a NAME="Class.getAttribute" ID="Class.getAttribute"></a> |
233 </dl><a NAME="Class.getAttribute" ID="Class.getAttribute"></a> |
234 <h4>Class.getAttribute</h4> |
234 <h4>Class.getAttribute</h4> |
235 <b>getAttribute</b>(<i>name</i>) |
235 <b>getAttribute</b>(<i>name</i>) |
236 <p> |
236 <p> |
237 Public method to retrieve an attribute by name. |
237 Public method to retrieve an attribute by name. |
238 </p><dl> |
238 </p><dl> |
239 <dt><i>name</i></dt> |
239 <dt><i>name</i></dt> |
240 <dd> |
240 <dd> |
241 name of the attribute (string) |
241 name of the attribute (string) |
242 </dd> |
242 </dd> |
243 </dl><dl> |
243 </dl><dl> |
244 <dt>Returns:</dt> |
244 <dt>Returns:</dt> |
245 <dd> |
245 <dd> |
246 the named attribute or None |
246 the named attribute or None |
247 </dd> |
247 </dd> |
248 </dl><a NAME="Class.getMethod" ID="Class.getMethod"></a> |
248 </dl><a NAME="Class.getMethod" ID="Class.getMethod"></a> |
249 <h4>Class.getMethod</h4> |
249 <h4>Class.getMethod</h4> |
250 <b>getMethod</b>(<i>name</i>) |
250 <b>getMethod</b>(<i>name</i>) |
251 <p> |
251 <p> |
252 Public method to retrieve a method by name. |
252 Public method to retrieve a method by name. |
253 </p><dl> |
253 </p><dl> |
254 <dt><i>name</i></dt> |
254 <dt><i>name</i></dt> |
255 <dd> |
255 <dd> |
256 name of the method (string) |
256 name of the method (string) |
257 </dd> |
257 </dd> |
258 </dl><dl> |
258 </dl><dl> |
259 <dt>Returns:</dt> |
259 <dt>Returns:</dt> |
260 <dd> |
260 <dd> |
261 the named method or None |
261 the named method or None |
262 </dd> |
262 </dd> |
263 </dl><a NAME="Class.setEndLine" ID="Class.setEndLine"></a> |
263 </dl><a NAME="Class.setEndLine" ID="Class.setEndLine"></a> |
264 <h4>Class.setEndLine</h4> |
264 <h4>Class.setEndLine</h4> |
265 <b>setEndLine</b>(<i>endLineNo</i>) |
265 <b>setEndLine</b>(<i>endLineNo</i>) |
266 <p> |
266 <p> |
267 Public method to record the number of the last line of a class. |
267 Public method to record the number of the last line of a class. |
268 </p><dl> |
268 </p><dl> |
269 <dt><i>endLineNo</i></dt> |
269 <dt><i>endLineNo</i></dt> |
270 <dd> |
270 <dd> |
271 number of the last line (integer) |
271 number of the last line (integer) |
272 </dd> |
272 </dd> |
273 </dl> |
273 </dl> |
274 <div align="right"><a href="#top">Up</a></div> |
274 <div align="right"><a href="#top">Up</a></div> |
275 <hr /><hr /> |
275 <hr /><hr /> |
276 <a NAME="Function" ID="Function"></a> |
276 <a NAME="Function" ID="Function"></a> |
277 <h2>Function</h2> |
277 <h2>Function</h2> |
278 <p> |
278 <p> |
279 Class to represent a Python function or method. |
279 Class to represent a Python function or method. |
280 </p> |
280 </p> |
281 <h3>Derived from</h3> |
281 <h3>Derived from</h3> |
282 VisibilityBase |
282 VisibilityBase |
283 <h3>Class Attributes</h3> |
283 <h3>Class Attributes</h3> |
284 <table> |
284 <table> |
286 </table> |
286 </table> |
287 <h3>Methods</h3> |
287 <h3>Methods</h3> |
288 <table> |
288 <table> |
289 <tr> |
289 <tr> |
290 <td><a href="#Function.__init__">Function</a></td> |
290 <td><a href="#Function.__init__">Function</a></td> |
291 <td>Constructor</td> |
291 <td>Constructor</td> |
292 </tr><tr> |
292 </tr><tr> |
293 <td><a href="#Function.addDescription">addDescription</a></td> |
293 <td><a href="#Function.addDescription">addDescription</a></td> |
294 <td>Public method to store the functions docstring.</td> |
294 <td>Public method to store the functions docstring.</td> |
295 </tr> |
295 </tr> |
296 </table> |
296 </table> |
297 <a NAME="Function.__init__" ID="Function.__init__"></a> |
297 <a NAME="Function.__init__" ID="Function.__init__"></a> |
298 <h4>Function (Constructor)</h4> |
298 <h4>Function (Constructor)</h4> |
299 <b>Function</b>(<i>module, name, file, lineno, signature = '', pyqtSignature = None</i>) |
299 <b>Function</b>(<i>module, name, file, lineno, signature = '', pyqtSignature = None</i>) |
300 <p> |
300 <p> |
301 Constructor |
301 Constructor |
302 </p><dl> |
302 </p><dl> |
303 <dt><i>module</i></dt> |
303 <dt><i>module</i></dt> |
304 <dd> |
304 <dd> |
305 name of module containing this function (string) |
305 name of module containing this function (string) |
306 </dd><dt><i>name</i></dt> |
306 </dd><dt><i>name</i></dt> |
307 <dd> |
307 <dd> |
308 name of the function (string) |
308 name of the function (string) |
309 </dd><dt><i>file</i></dt> |
309 </dd><dt><i>file</i></dt> |
310 <dd> |
310 <dd> |
311 name of file containing this function (string) |
311 name of file containing this function (string) |
312 </dd><dt><i>lineno</i></dt> |
312 </dd><dt><i>lineno</i></dt> |
313 <dd> |
313 <dd> |
314 linenumber of the function definition (integer) |
314 linenumber of the function definition (integer) |
315 </dd><dt><i>signature</i></dt> |
315 </dd><dt><i>signature</i></dt> |
316 <dd> |
316 <dd> |
317 the functions call signature (string) |
317 the functions call signature (string) |
318 </dd><dt><i>pyqtSignature</i></dt> |
318 </dd><dt><i>pyqtSignature</i></dt> |
319 <dd> |
319 <dd> |
320 the functions PyQt signature (string) |
320 the functions PyQt signature (string) |
321 </dd> |
321 </dd> |
322 </dl><a NAME="Function.addDescription" ID="Function.addDescription"></a> |
322 </dl><a NAME="Function.addDescription" ID="Function.addDescription"></a> |
323 <h4>Function.addDescription</h4> |
323 <h4>Function.addDescription</h4> |
324 <b>addDescription</b>(<i>description</i>) |
324 <b>addDescription</b>(<i>description</i>) |
325 <p> |
325 <p> |
326 Public method to store the functions docstring. |
326 Public method to store the functions docstring. |
327 </p><dl> |
327 </p><dl> |
328 <dt><i>description</i></dt> |
328 <dt><i>description</i></dt> |
329 <dd> |
329 <dd> |
330 the docstring to be stored (string) |
330 the docstring to be stored (string) |
331 </dd> |
331 </dd> |
332 </dl> |
332 </dl> |
333 <div align="right"><a href="#top">Up</a></div> |
333 <div align="right"><a href="#top">Up</a></div> |
334 <hr /><hr /> |
334 <hr /><hr /> |
335 <a NAME="Module" ID="Module"></a> |
335 <a NAME="Module" ID="Module"></a> |
336 <h2>Module</h2> |
336 <h2>Module</h2> |
337 <p> |
337 <p> |
338 Class to represent a Python module. |
338 Class to represent a Python module. |
339 </p> |
339 </p> |
340 <h3>Derived from</h3> |
340 <h3>Derived from</h3> |
341 object |
341 object |
342 <h3>Class Attributes</h3> |
342 <h3>Class Attributes</h3> |
343 <table> |
343 <table> |
345 </table> |
345 </table> |
346 <h3>Methods</h3> |
346 <h3>Methods</h3> |
347 <table> |
347 <table> |
348 <tr> |
348 <tr> |
349 <td><a href="#Module.__init__">Module</a></td> |
349 <td><a href="#Module.__init__">Module</a></td> |
350 <td>Constructor</td> |
350 <td>Constructor</td> |
351 </tr><tr> |
351 </tr><tr> |
352 <td><a href="#Module.__py_scan">__py_scan</a></td> |
352 <td><a href="#Module.__py_scan">__py_scan</a></td> |
353 <td>Private method to scan the source text of a Python module and retrieve the relevant information.</td> |
353 <td>Private method to scan the source text of a Python module and retrieve the relevant information.</td> |
354 </tr><tr> |
354 </tr><tr> |
355 <td><a href="#Module.__py_setVisibility">__py_setVisibility</a></td> |
355 <td><a href="#Module.__py_setVisibility">__py_setVisibility</a></td> |
356 <td>Private method to set the visibility of an object.</td> |
356 <td>Private method to set the visibility of an object.</td> |
357 </tr><tr> |
357 </tr><tr> |
358 <td><a href="#Module.__rb_scan">__rb_scan</a></td> |
358 <td><a href="#Module.__rb_scan">__rb_scan</a></td> |
359 <td>Private method to scan the source text of a Python module and retrieve the relevant information.</td> |
359 <td>Private method to scan the source text of a Python module and retrieve the relevant information.</td> |
360 </tr><tr> |
360 </tr><tr> |
361 <td><a href="#Module.addClass">addClass</a></td> |
361 <td><a href="#Module.addClass">addClass</a></td> |
362 <td>Public method to add information about a class.</td> |
362 <td>Public method to add information about a class.</td> |
363 </tr><tr> |
363 </tr><tr> |
364 <td><a href="#Module.addDescription">addDescription</a></td> |
364 <td><a href="#Module.addDescription">addDescription</a></td> |
365 <td>Protected method to store the modules docstring.</td> |
365 <td>Protected method to store the modules docstring.</td> |
366 </tr><tr> |
366 </tr><tr> |
367 <td><a href="#Module.addFunction">addFunction</a></td> |
367 <td><a href="#Module.addFunction">addFunction</a></td> |
368 <td>Public method to add information about a function.</td> |
368 <td>Public method to add information about a function.</td> |
369 </tr><tr> |
369 </tr><tr> |
370 <td><a href="#Module.addGlobal">addGlobal</a></td> |
370 <td><a href="#Module.addGlobal">addGlobal</a></td> |
371 <td>Public method to add information about global variables.</td> |
371 <td>Public method to add information about global variables.</td> |
372 </tr><tr> |
372 </tr><tr> |
373 <td><a href="#Module.addModule">addModule</a></td> |
373 <td><a href="#Module.addModule">addModule</a></td> |
374 <td>Public method to add information about a Ruby module.</td> |
374 <td>Public method to add information about a Ruby module.</td> |
375 </tr><tr> |
375 </tr><tr> |
376 <td><a href="#Module.addPathToHierarchy">addPathToHierarchy</a></td> |
376 <td><a href="#Module.addPathToHierarchy">addPathToHierarchy</a></td> |
377 <td>Public method to put the exhausted path into the result dictionary.</td> |
377 <td>Public method to put the exhausted path into the result dictionary.</td> |
378 </tr><tr> |
378 </tr><tr> |
379 <td><a href="#Module.assembleHierarchy">assembleHierarchy</a></td> |
379 <td><a href="#Module.assembleHierarchy">assembleHierarchy</a></td> |
380 <td>Public method to assemble the inheritance hierarchy.</td> |
380 <td>Public method to assemble the inheritance hierarchy.</td> |
381 </tr><tr> |
381 </tr><tr> |
382 <td><a href="#Module.createHierarchy">createHierarchy</a></td> |
382 <td><a href="#Module.createHierarchy">createHierarchy</a></td> |
383 <td>Public method to build the inheritance hierarchy for all classes of this module.</td> |
383 <td>Public method to build the inheritance hierarchy for all classes of this module.</td> |
384 </tr><tr> |
384 </tr><tr> |
385 <td><a href="#Module.getFileName">getFileName</a></td> |
385 <td><a href="#Module.getFileName">getFileName</a></td> |
386 <td>Public method to retrieve the modules filename.</td> |
386 <td>Public method to retrieve the modules filename.</td> |
387 </tr><tr> |
387 </tr><tr> |
388 <td><a href="#Module.getName">getName</a></td> |
388 <td><a href="#Module.getName">getName</a></td> |
389 <td>Public method to retrieve the modules name.</td> |
389 <td>Public method to retrieve the modules name.</td> |
390 </tr><tr> |
390 </tr><tr> |
391 <td><a href="#Module.getType">getType</a></td> |
391 <td><a href="#Module.getType">getType</a></td> |
392 <td>Public method to get the type of the module's source.</td> |
392 <td>Public method to get the type of the module's source.</td> |
393 </tr><tr> |
393 </tr><tr> |
394 <td><a href="#Module.scan">scan</a></td> |
394 <td><a href="#Module.scan">scan</a></td> |
395 <td>Public method to scan the source text and retrieve the relevant information.</td> |
395 <td>Public method to scan the source text and retrieve the relevant information.</td> |
396 </tr> |
396 </tr> |
397 </table> |
397 </table> |
398 <a NAME="Module.__init__" ID="Module.__init__"></a> |
398 <a NAME="Module.__init__" ID="Module.__init__"></a> |
399 <h4>Module (Constructor)</h4> |
399 <h4>Module (Constructor)</h4> |
400 <b>Module</b>(<i>name, file=None, type=None</i>) |
400 <b>Module</b>(<i>name, file=None, type=None</i>) |
401 <p> |
401 <p> |
402 Constructor |
402 Constructor |
403 </p><dl> |
403 </p><dl> |
404 <dt><i>name</i></dt> |
404 <dt><i>name</i></dt> |
405 <dd> |
405 <dd> |
406 name of this module (string) |
406 name of this module (string) |
407 </dd><dt><i>file</i></dt> |
407 </dd><dt><i>file</i></dt> |
408 <dd> |
408 <dd> |
409 filename of file containing this module (string) |
409 filename of file containing this module (string) |
410 </dd><dt><i>type</i></dt> |
410 </dd><dt><i>type</i></dt> |
411 <dd> |
411 <dd> |
412 type of this module |
412 type of this module |
413 </dd> |
413 </dd> |
414 </dl><a NAME="Module.__py_scan" ID="Module.__py_scan"></a> |
414 </dl><a NAME="Module.__py_scan" ID="Module.__py_scan"></a> |
415 <h4>Module.__py_scan</h4> |
415 <h4>Module.__py_scan</h4> |
416 <b>__py_scan</b>(<i>src</i>) |
416 <b>__py_scan</b>(<i>src</i>) |
417 <p> |
417 <p> |
418 Private method to scan the source text of a Python module and retrieve the |
418 Private method to scan the source text of a Python module and retrieve the |
419 relevant information. |
419 relevant information. |
420 </p><dl> |
420 </p><dl> |
421 <dt><i>src</i></dt> |
421 <dt><i>src</i></dt> |
422 <dd> |
422 <dd> |
423 the source text to be scanned (string) |
423 the source text to be scanned (string) |
424 </dd> |
424 </dd> |
425 </dl><a NAME="Module.__py_setVisibility" ID="Module.__py_setVisibility"></a> |
425 </dl><a NAME="Module.__py_setVisibility" ID="Module.__py_setVisibility"></a> |
426 <h4>Module.__py_setVisibility</h4> |
426 <h4>Module.__py_setVisibility</h4> |
427 <b>__py_setVisibility</b>(<i>object</i>) |
427 <b>__py_setVisibility</b>(<i>object</i>) |
428 <p> |
428 <p> |
429 Private method to set the visibility of an object. |
429 Private method to set the visibility of an object. |
430 </p><dl> |
430 </p><dl> |
431 <dt><i>object</i></dt> |
431 <dt><i>object</i></dt> |
432 <dd> |
432 <dd> |
433 reference to the object (Attribute, Class or Function) |
433 reference to the object (Attribute, Class or Function) |
434 </dd> |
434 </dd> |
435 </dl><a NAME="Module.__rb_scan" ID="Module.__rb_scan"></a> |
435 </dl><a NAME="Module.__rb_scan" ID="Module.__rb_scan"></a> |
436 <h4>Module.__rb_scan</h4> |
436 <h4>Module.__rb_scan</h4> |
437 <b>__rb_scan</b>(<i>src</i>) |
437 <b>__rb_scan</b>(<i>src</i>) |
438 <p> |
438 <p> |
439 Private method to scan the source text of a Python module and retrieve the |
439 Private method to scan the source text of a Python module and retrieve the |
440 relevant information. |
440 relevant information. |
441 </p><dl> |
441 </p><dl> |
442 <dt><i>src</i></dt> |
442 <dt><i>src</i></dt> |
443 <dd> |
443 <dd> |
444 the source text to be scanned (string) |
444 the source text to be scanned (string) |
445 </dd> |
445 </dd> |
446 </dl><a NAME="Module.addClass" ID="Module.addClass"></a> |
446 </dl><a NAME="Module.addClass" ID="Module.addClass"></a> |
447 <h4>Module.addClass</h4> |
447 <h4>Module.addClass</h4> |
448 <b>addClass</b>(<i>name, _class</i>) |
448 <b>addClass</b>(<i>name, _class</i>) |
449 <p> |
449 <p> |
450 Public method to add information about a class. |
450 Public method to add information about a class. |
451 </p><dl> |
451 </p><dl> |
452 <dt><i>name</i></dt> |
452 <dt><i>name</i></dt> |
453 <dd> |
453 <dd> |
454 name of class to be added (string) |
454 name of class to be added (string) |
455 </dd><dt><i>_class</i></dt> |
455 </dd><dt><i>_class</i></dt> |
456 <dd> |
456 <dd> |
457 Class object to be added |
457 Class object to be added |
458 </dd> |
458 </dd> |
459 </dl><a NAME="Module.addDescription" ID="Module.addDescription"></a> |
459 </dl><a NAME="Module.addDescription" ID="Module.addDescription"></a> |
460 <h4>Module.addDescription</h4> |
460 <h4>Module.addDescription</h4> |
461 <b>addDescription</b>(<i>description</i>) |
461 <b>addDescription</b>(<i>description</i>) |
462 <p> |
462 <p> |
463 Protected method to store the modules docstring. |
463 Protected method to store the modules docstring. |
464 </p><dl> |
464 </p><dl> |
465 <dt><i>description</i></dt> |
465 <dt><i>description</i></dt> |
466 <dd> |
466 <dd> |
467 the docstring to be stored (string) |
467 the docstring to be stored (string) |
468 </dd> |
468 </dd> |
469 </dl><a NAME="Module.addFunction" ID="Module.addFunction"></a> |
469 </dl><a NAME="Module.addFunction" ID="Module.addFunction"></a> |
470 <h4>Module.addFunction</h4> |
470 <h4>Module.addFunction</h4> |
471 <b>addFunction</b>(<i>name, function</i>) |
471 <b>addFunction</b>(<i>name, function</i>) |
472 <p> |
472 <p> |
473 Public method to add information about a function. |
473 Public method to add information about a function. |
474 </p><dl> |
474 </p><dl> |
475 <dt><i>name</i></dt> |
475 <dt><i>name</i></dt> |
476 <dd> |
476 <dd> |
477 name of function to be added (string) |
477 name of function to be added (string) |
478 </dd><dt><i>function</i></dt> |
478 </dd><dt><i>function</i></dt> |
479 <dd> |
479 <dd> |
480 Function object to be added |
480 Function object to be added |
481 </dd> |
481 </dd> |
482 </dl><a NAME="Module.addGlobal" ID="Module.addGlobal"></a> |
482 </dl><a NAME="Module.addGlobal" ID="Module.addGlobal"></a> |
483 <h4>Module.addGlobal</h4> |
483 <h4>Module.addGlobal</h4> |
484 <b>addGlobal</b>(<i>name, attr</i>) |
484 <b>addGlobal</b>(<i>name, attr</i>) |
485 <p> |
485 <p> |
486 Public method to add information about global variables. |
486 Public method to add information about global variables. |
487 </p><dl> |
487 </p><dl> |
488 <dt><i>name</i></dt> |
488 <dt><i>name</i></dt> |
489 <dd> |
489 <dd> |
490 name of the global to add (string) |
490 name of the global to add (string) |
491 </dd><dt><i>attr</i></dt> |
491 </dd><dt><i>attr</i></dt> |
492 <dd> |
492 <dd> |
493 Attribute object to be added |
493 Attribute object to be added |
494 </dd> |
494 </dd> |
495 </dl><a NAME="Module.addModule" ID="Module.addModule"></a> |
495 </dl><a NAME="Module.addModule" ID="Module.addModule"></a> |
496 <h4>Module.addModule</h4> |
496 <h4>Module.addModule</h4> |
497 <b>addModule</b>(<i>name, module</i>) |
497 <b>addModule</b>(<i>name, module</i>) |
498 <p> |
498 <p> |
499 Public method to add information about a Ruby module. |
499 Public method to add information about a Ruby module. |
500 </p><dl> |
500 </p><dl> |
501 <dt><i>name</i></dt> |
501 <dt><i>name</i></dt> |
502 <dd> |
502 <dd> |
503 name of module to be added (string) |
503 name of module to be added (string) |
504 </dd><dt><i>module</i></dt> |
504 </dd><dt><i>module</i></dt> |
505 <dd> |
505 <dd> |
506 Module object to be added |
506 Module object to be added |
507 </dd> |
507 </dd> |
508 </dl><a NAME="Module.addPathToHierarchy" ID="Module.addPathToHierarchy"></a> |
508 </dl><a NAME="Module.addPathToHierarchy" ID="Module.addPathToHierarchy"></a> |
509 <h4>Module.addPathToHierarchy</h4> |
509 <h4>Module.addPathToHierarchy</h4> |
510 <b>addPathToHierarchy</b>(<i>path, result, fn</i>) |
510 <b>addPathToHierarchy</b>(<i>path, result, fn</i>) |
511 <p> |
511 <p> |
512 Public method to put the exhausted path into the result dictionary. |
512 Public method to put the exhausted path into the result dictionary. |
513 </p><dl> |
513 </p><dl> |
514 <dt><i>path</i></dt> |
514 <dt><i>path</i></dt> |
515 <dd> |
515 <dd> |
516 the exhausted path of classes |
516 the exhausted path of classes |
517 </dd><dt><i>result</i></dt> |
517 </dd><dt><i>result</i></dt> |
518 <dd> |
518 <dd> |
519 the result dictionary |
519 the result dictionary |
520 </dd><dt><i>fn</i></dt> |
520 </dd><dt><i>fn</i></dt> |
521 <dd> |
521 <dd> |
522 function to call for classe that are already part of the |
522 function to call for classe that are already part of the |
523 result dictionary |
523 result dictionary |
524 </dd> |
524 </dd> |
525 </dl><a NAME="Module.assembleHierarchy" ID="Module.assembleHierarchy"></a> |
525 </dl><a NAME="Module.assembleHierarchy" ID="Module.assembleHierarchy"></a> |
526 <h4>Module.assembleHierarchy</h4> |
526 <h4>Module.assembleHierarchy</h4> |
527 <b>assembleHierarchy</b>(<i>name, classes, path, result</i>) |
527 <b>assembleHierarchy</b>(<i>name, classes, path, result</i>) |
528 <p> |
528 <p> |
529 Public method to assemble the inheritance hierarchy. |
529 Public method to assemble the inheritance hierarchy. |
530 </p><p> |
530 </p><p> |
531 This method will traverse the class hierarchy, from a given class |
531 This method will traverse the class hierarchy, from a given class |
532 and build up a nested dictionary of super-classes. The result is |
532 and build up a nested dictionary of super-classes. The result is |
533 intended to be inverted, i.e. the highest level are the super classes. |
533 intended to be inverted, i.e. the highest level are the super classes. |
534 </p><p> |
534 </p><p> |
535 This code is borrowed from Boa Constructor. |
535 This code is borrowed from Boa Constructor. |
536 </p><dl> |
536 </p><dl> |
537 <dt><i>name</i></dt> |
537 <dt><i>name</i></dt> |
538 <dd> |
538 <dd> |
539 name of class to assemble hierarchy (string) |
539 name of class to assemble hierarchy (string) |
540 </dd><dt><i>classes</i></dt> |
540 </dd><dt><i>classes</i></dt> |
541 <dd> |
541 <dd> |
542 A dictionary of classes to look in. |
542 A dictionary of classes to look in. |
543 </dd><dt><i>path</i></dt> |
543 </dd><dt><i>path</i></dt> |
544 <dd> |
544 <dd> |
545 |
545 |
546 </dd><dt><i>result</i></dt> |
546 </dd><dt><i>result</i></dt> |
547 <dd> |
547 <dd> |
548 The resultant hierarchy |
548 The resultant hierarchy |
549 </dd> |
549 </dd> |
550 </dl><a NAME="Module.createHierarchy" ID="Module.createHierarchy"></a> |
550 </dl><a NAME="Module.createHierarchy" ID="Module.createHierarchy"></a> |
551 <h4>Module.createHierarchy</h4> |
551 <h4>Module.createHierarchy</h4> |
552 <b>createHierarchy</b>(<i></i>) |
552 <b>createHierarchy</b>(<i></i>) |
553 <p> |
553 <p> |
554 Public method to build the inheritance hierarchy for all classes of this module. |
554 Public method to build the inheritance hierarchy for all classes of this module. |
555 </p><dl> |
555 </p><dl> |
556 <dt>Returns:</dt> |
556 <dt>Returns:</dt> |
557 <dd> |
557 <dd> |
558 A dictionary with inheritance hierarchies. |
558 A dictionary with inheritance hierarchies. |
559 </dd> |
559 </dd> |
560 </dl><a NAME="Module.getFileName" ID="Module.getFileName"></a> |
560 </dl><a NAME="Module.getFileName" ID="Module.getFileName"></a> |
561 <h4>Module.getFileName</h4> |
561 <h4>Module.getFileName</h4> |
562 <b>getFileName</b>(<i></i>) |
562 <b>getFileName</b>(<i></i>) |
563 <p> |
563 <p> |
564 Public method to retrieve the modules filename. |
564 Public method to retrieve the modules filename. |
565 </p><dl> |
565 </p><dl> |
566 <dt>Returns:</dt> |
566 <dt>Returns:</dt> |
567 <dd> |
567 <dd> |
568 module filename (string) |
568 module filename (string) |
569 </dd> |
569 </dd> |
570 </dl><a NAME="Module.getName" ID="Module.getName"></a> |
570 </dl><a NAME="Module.getName" ID="Module.getName"></a> |
571 <h4>Module.getName</h4> |
571 <h4>Module.getName</h4> |
572 <b>getName</b>(<i></i>) |
572 <b>getName</b>(<i></i>) |
573 <p> |
573 <p> |
574 Public method to retrieve the modules name. |
574 Public method to retrieve the modules name. |
575 </p><dl> |
575 </p><dl> |
576 <dt>Returns:</dt> |
576 <dt>Returns:</dt> |
577 <dd> |
577 <dd> |
578 module name (string) |
578 module name (string) |
579 </dd> |
579 </dd> |
580 </dl><a NAME="Module.getType" ID="Module.getType"></a> |
580 </dl><a NAME="Module.getType" ID="Module.getType"></a> |
581 <h4>Module.getType</h4> |
581 <h4>Module.getType</h4> |
582 <b>getType</b>(<i></i>) |
582 <b>getType</b>(<i></i>) |
583 <p> |
583 <p> |
584 Public method to get the type of the module's source. |
584 Public method to get the type of the module's source. |
585 </p><dl> |
585 </p><dl> |
586 <dt>Returns:</dt> |
586 <dt>Returns:</dt> |
587 <dd> |
587 <dd> |
588 type of the modules's source (string) |
588 type of the modules's source (string) |
589 </dd> |
589 </dd> |
590 </dl><a NAME="Module.scan" ID="Module.scan"></a> |
590 </dl><a NAME="Module.scan" ID="Module.scan"></a> |
591 <h4>Module.scan</h4> |
591 <h4>Module.scan</h4> |
592 <b>scan</b>(<i>src</i>) |
592 <b>scan</b>(<i>src</i>) |
593 <p> |
593 <p> |
594 Public method to scan the source text and retrieve the relevant information. |
594 Public method to scan the source text and retrieve the relevant information. |
595 </p><dl> |
595 </p><dl> |
596 <dt><i>src</i></dt> |
596 <dt><i>src</i></dt> |
597 <dd> |
597 <dd> |
598 the source text to be scanned (string) |
598 the source text to be scanned (string) |
599 </dd> |
599 </dd> |
600 </dl> |
600 </dl> |
601 <div align="right"><a href="#top">Up</a></div> |
601 <div align="right"><a href="#top">Up</a></div> |
602 <hr /><hr /> |
602 <hr /><hr /> |
603 <a NAME="RbModule" ID="RbModule"></a> |
603 <a NAME="RbModule" ID="RbModule"></a> |
604 <h2>RbModule</h2> |
604 <h2>RbModule</h2> |
605 <p> |
605 <p> |
606 Class to represent a Ruby module. |
606 Class to represent a Ruby module. |
607 </p> |
607 </p> |
608 <h3>Derived from</h3> |
608 <h3>Derived from</h3> |
609 Class |
609 Class |
610 <h3>Class Attributes</h3> |
610 <h3>Class Attributes</h3> |
611 <table> |
611 <table> |
669 </table> |
669 </table> |
670 <h3>Methods</h3> |
670 <h3>Methods</h3> |
671 <table> |
671 <table> |
672 <tr> |
672 <tr> |
673 <td><a href="#VisibilityBase.isPrivate">isPrivate</a></td> |
673 <td><a href="#VisibilityBase.isPrivate">isPrivate</a></td> |
674 <td>Public method to check, if the visibility is Private.</td> |
674 <td>Public method to check, if the visibility is Private.</td> |
675 </tr><tr> |
675 </tr><tr> |
676 <td><a href="#VisibilityBase.isProtected">isProtected</a></td> |
676 <td><a href="#VisibilityBase.isProtected">isProtected</a></td> |
677 <td>Public method to check, if the visibility is Protected.</td> |
677 <td>Public method to check, if the visibility is Protected.</td> |
678 </tr><tr> |
678 </tr><tr> |
679 <td><a href="#VisibilityBase.isPublic">isPublic</a></td> |
679 <td><a href="#VisibilityBase.isPublic">isPublic</a></td> |
680 <td>Public method to check, if the visibility is Public.</td> |
680 <td>Public method to check, if the visibility is Public.</td> |
681 </tr><tr> |
681 </tr><tr> |
682 <td><a href="#VisibilityBase.setPrivate">setPrivate</a></td> |
682 <td><a href="#VisibilityBase.setPrivate">setPrivate</a></td> |
683 <td>Public method to set the visibility to Private.</td> |
683 <td>Public method to set the visibility to Private.</td> |
684 </tr><tr> |
684 </tr><tr> |
685 <td><a href="#VisibilityBase.setProtected">setProtected</a></td> |
685 <td><a href="#VisibilityBase.setProtected">setProtected</a></td> |
686 <td>Public method to set the visibility to Protected.</td> |
686 <td>Public method to set the visibility to Protected.</td> |
687 </tr><tr> |
687 </tr><tr> |
688 <td><a href="#VisibilityBase.setPublic">setPublic</a></td> |
688 <td><a href="#VisibilityBase.setPublic">setPublic</a></td> |
689 <td>Public method to set the visibility to Public.</td> |
689 <td>Public method to set the visibility to Public.</td> |
690 </tr> |
690 </tr> |
691 </table> |
691 </table> |
692 <a NAME="VisibilityBase.isPrivate" ID="VisibilityBase.isPrivate"></a> |
692 <a NAME="VisibilityBase.isPrivate" ID="VisibilityBase.isPrivate"></a> |
693 <h4>VisibilityBase.isPrivate</h4> |
693 <h4>VisibilityBase.isPrivate</h4> |
694 <b>isPrivate</b>(<i></i>) |
694 <b>isPrivate</b>(<i></i>) |
695 <p> |
695 <p> |
696 Public method to check, if the visibility is Private. |
696 Public method to check, if the visibility is Private. |
697 </p><dl> |
697 </p><dl> |
698 <dt>Returns:</dt> |
698 <dt>Returns:</dt> |
699 <dd> |
699 <dd> |
700 flag indicating Private visibility (boolean) |
700 flag indicating Private visibility (boolean) |
701 </dd> |
701 </dd> |
702 </dl><a NAME="VisibilityBase.isProtected" ID="VisibilityBase.isProtected"></a> |
702 </dl><a NAME="VisibilityBase.isProtected" ID="VisibilityBase.isProtected"></a> |
703 <h4>VisibilityBase.isProtected</h4> |
703 <h4>VisibilityBase.isProtected</h4> |
704 <b>isProtected</b>(<i></i>) |
704 <b>isProtected</b>(<i></i>) |
705 <p> |
705 <p> |
706 Public method to check, if the visibility is Protected. |
706 Public method to check, if the visibility is Protected. |
707 </p><dl> |
707 </p><dl> |
708 <dt>Returns:</dt> |
708 <dt>Returns:</dt> |
709 <dd> |
709 <dd> |
710 flag indicating Protected visibility (boolean) |
710 flag indicating Protected visibility (boolean) |
711 </dd> |
711 </dd> |
712 </dl><a NAME="VisibilityBase.isPublic" ID="VisibilityBase.isPublic"></a> |
712 </dl><a NAME="VisibilityBase.isPublic" ID="VisibilityBase.isPublic"></a> |
713 <h4>VisibilityBase.isPublic</h4> |
713 <h4>VisibilityBase.isPublic</h4> |
714 <b>isPublic</b>(<i></i>) |
714 <b>isPublic</b>(<i></i>) |
715 <p> |
715 <p> |
716 Public method to check, if the visibility is Public. |
716 Public method to check, if the visibility is Public. |
717 </p><dl> |
717 </p><dl> |
718 <dt>Returns:</dt> |
718 <dt>Returns:</dt> |
719 <dd> |
719 <dd> |
720 flag indicating Public visibility (boolean) |
720 flag indicating Public visibility (boolean) |
721 </dd> |
721 </dd> |
722 </dl><a NAME="VisibilityBase.setPrivate" ID="VisibilityBase.setPrivate"></a> |
722 </dl><a NAME="VisibilityBase.setPrivate" ID="VisibilityBase.setPrivate"></a> |
723 <h4>VisibilityBase.setPrivate</h4> |
723 <h4>VisibilityBase.setPrivate</h4> |
724 <b>setPrivate</b>(<i></i>) |
724 <b>setPrivate</b>(<i></i>) |
725 <p> |
725 <p> |
726 Public method to set the visibility to Private. |
726 Public method to set the visibility to Private. |
727 </p><a NAME="VisibilityBase.setProtected" ID="VisibilityBase.setProtected"></a> |
727 </p><a NAME="VisibilityBase.setProtected" ID="VisibilityBase.setProtected"></a> |
728 <h4>VisibilityBase.setProtected</h4> |
728 <h4>VisibilityBase.setProtected</h4> |
729 <b>setProtected</b>(<i></i>) |
729 <b>setProtected</b>(<i></i>) |
730 <p> |
730 <p> |
731 Public method to set the visibility to Protected. |
731 Public method to set the visibility to Protected. |
732 </p><a NAME="VisibilityBase.setPublic" ID="VisibilityBase.setPublic"></a> |
732 </p><a NAME="VisibilityBase.setPublic" ID="VisibilityBase.setPublic"></a> |
733 <h4>VisibilityBase.setPublic</h4> |
733 <h4>VisibilityBase.setPublic</h4> |
734 <b>setPublic</b>(<i></i>) |
734 <b>setPublic</b>(<i></i>) |
735 <p> |
735 <p> |
736 Public method to set the visibility to Public. |
736 Public method to set the visibility to Public. |
737 </p> |
737 </p> |
738 <div align="right"><a href="#top">Up</a></div> |
738 <div align="right"><a href="#top">Up</a></div> |
739 <hr /><hr /> |
739 <hr /><hr /> |
740 <a NAME="_indent" ID="_indent"></a> |
740 <a NAME="_indent" ID="_indent"></a> |
741 <h2>_indent</h2> |
741 <h2>_indent</h2> |
742 <b>_indent</b>(<i>ws</i>) |
742 <b>_indent</b>(<i>ws</i>) |
743 <p> |
743 <p> |
744 Protected function to determine the indent width of a whitespace string. |
744 Protected function to determine the indent width of a whitespace string. |
745 </p><dl> |
745 </p><dl> |
746 <dt><i>ws</i></dt> |
746 <dt><i>ws</i></dt> |
747 <dd> |
747 <dd> |
748 The whitespace string to be cheked. (string) |
748 The whitespace string to be cheked. (string) |
749 </dd> |
749 </dd> |
750 </dl><dl> |
750 </dl><dl> |
751 <dt>Returns:</dt> |
751 <dt>Returns:</dt> |
752 <dd> |
752 <dd> |
753 Length of the whitespace string after tab expansion. |
753 Length of the whitespace string after tab expansion. |
754 </dd> |
754 </dd> |
755 </dl> |
755 </dl> |
756 <div align="right"><a href="#top">Up</a></div> |
756 <div align="right"><a href="#top">Up</a></div> |
757 <hr /><hr /> |
757 <hr /><hr /> |
758 <a NAME="find_module" ID="find_module"></a> |
758 <a NAME="find_module" ID="find_module"></a> |
759 <h2>find_module</h2> |
759 <h2>find_module</h2> |
760 <b>find_module</b>(<i>name, path, extensions</i>) |
760 <b>find_module</b>(<i>name, path, extensions</i>) |
761 <p> |
761 <p> |
762 Module function to extend the Python module finding mechanism. |
762 Module function to extend the Python module finding mechanism. |
763 </p><p> |
763 </p><p> |
764 This function searches for files in the given path. If the filename |
764 This function searches for files in the given path. If the filename |
765 doesn't have an extension or an extension of .py, the normal search |
765 doesn't have an extension or an extension of .py, the normal search |
766 implemented in the imp module is used. For all other supported files |
766 implemented in the imp module is used. For all other supported files |
767 only path is searched. |
767 only path is searched. |
768 </p><dl> |
768 </p><dl> |
769 <dt><i>name</i></dt> |
769 <dt><i>name</i></dt> |
770 <dd> |
770 <dd> |
771 filename or modulename to search for (string) |
771 filename or modulename to search for (string) |
772 </dd><dt><i>path</i></dt> |
772 </dd><dt><i>path</i></dt> |
773 <dd> |
773 <dd> |
774 search path (list of strings) |
774 search path (list of strings) |
775 </dd><dt><i>extensions</i></dt> |
775 </dd><dt><i>extensions</i></dt> |
776 <dd> |
776 <dd> |
777 list of extensions, which should be considered valid |
777 list of extensions, which should be considered valid |
778 source file extensions (list of strings) |
778 source file extensions (list of strings) |
779 </dd> |
779 </dd> |
780 </dl><dl> |
780 </dl><dl> |
781 <dt>Returns:</dt> |
781 <dt>Returns:</dt> |
782 <dd> |
782 <dd> |
783 tuple of the open file, pathname and description. Description |
783 tuple of the open file, pathname and description. Description |
784 is a tuple of file suffix, file mode and file type) |
784 is a tuple of file suffix, file mode and file type) |
785 </dd> |
785 </dd> |
786 </dl><dl> |
786 </dl><dl> |
787 <dt>Raises <b>ImportError</b>:</dt> |
787 <dt>Raises <b>ImportError</b>:</dt> |
788 <dd> |
788 <dd> |
789 The file or module wasn't found. |
789 The file or module wasn't found. |
790 </dd> |
790 </dd> |
791 </dl> |
791 </dl> |
792 <div align="right"><a href="#top">Up</a></div> |
792 <div align="right"><a href="#top">Up</a></div> |
793 <hr /><hr /> |
793 <hr /><hr /> |
794 <a NAME="readModule" ID="readModule"></a> |
794 <a NAME="readModule" ID="readModule"></a> |
795 <h2>readModule</h2> |
795 <h2>readModule</h2> |
796 <b>readModule</b>(<i>module, path = [], inpackage = False, basename = "", extensions = None, caching = True</i>) |
796 <b>readModule</b>(<i>module, path = [], inpackage = False, basename = "", extensions = None, caching = True</i>) |
797 <p> |
797 <p> |
798 Function to read a module file and parse it. |
798 Function to read a module file and parse it. |
799 </p><p> |
799 </p><p> |
800 The module is searched in path and sys.path, read and parsed. |
800 The module is searched in path and sys.path, read and parsed. |
801 If the module was parsed before, the information is taken |
801 If the module was parsed before, the information is taken |
802 from a cache in order to speed up processing. |
802 from a cache in order to speed up processing. |
803 </p><dl> |
803 </p><dl> |
804 <dt><i>module</i></dt> |
804 <dt><i>module</i></dt> |
805 <dd> |
805 <dd> |
806 Name of the module to be parsed (string) |
806 Name of the module to be parsed (string) |
807 </dd><dt><i>path</i></dt> |
807 </dd><dt><i>path</i></dt> |
808 <dd> |
808 <dd> |
809 Searchpath for the module (list of strings) |
809 Searchpath for the module (list of strings) |
810 </dd><dt><i>inpackage</i></dt> |
810 </dd><dt><i>inpackage</i></dt> |
811 <dd> |
811 <dd> |
812 Flag indicating that module is inside a |
812 Flag indicating that module is inside a |
813 package (boolean) |
813 package (boolean) |
814 </dd><dt><i>basename</i></dt> |
814 </dd><dt><i>basename</i></dt> |
815 <dd> |
815 <dd> |
816 a path basename. This basename is deleted from |
816 a path basename. This basename is deleted from |
817 the filename of the module file to be read. (string) |
817 the filename of the module file to be read. (string) |
818 </dd><dt><i>extensions</i></dt> |
818 </dd><dt><i>extensions</i></dt> |
819 <dd> |
819 <dd> |
820 list of extensions, which should be considered valid |
820 list of extensions, which should be considered valid |
821 source file extensions (list of strings) |
821 source file extensions (list of strings) |
822 </dd><dt><i>caching</i></dt> |
822 </dd><dt><i>caching</i></dt> |
823 <dd> |
823 <dd> |
824 flag indicating that the parsed module should be |
824 flag indicating that the parsed module should be |
825 cached (boolean) |
825 cached (boolean) |
826 </dd> |
826 </dd> |
827 </dl><dl> |
827 </dl><dl> |
828 <dt>Returns:</dt> |
828 <dt>Returns:</dt> |
829 <dd> |
829 <dd> |
830 reference to a Module object containing the parsed |
830 reference to a Module object containing the parsed |
831 module information (Module) |
831 module information (Module) |
832 </dd> |
832 </dd> |
833 </dl> |
833 </dl> |
834 <div align="right"><a href="#top">Up</a></div> |
834 <div align="right"><a href="#top">Up</a></div> |
835 <hr /><hr /> |
835 <hr /><hr /> |
836 <a NAME="resetParsedModule" ID="resetParsedModule"></a> |
836 <a NAME="resetParsedModule" ID="resetParsedModule"></a> |
837 <h2>resetParsedModule</h2> |
837 <h2>resetParsedModule</h2> |
838 <b>resetParsedModule</b>(<i>module, basename = ""</i>) |
838 <b>resetParsedModule</b>(<i>module, basename = ""</i>) |
839 <p> |
839 <p> |
840 Module function to clear one module from the list of parsed modules. |
840 Module function to clear one module from the list of parsed modules. |
841 </p><dl> |
841 </p><dl> |
842 <dt><i>module</i></dt> |
842 <dt><i>module</i></dt> |
843 <dd> |
843 <dd> |
844 Name of the module to be parsed (string) |
844 Name of the module to be parsed (string) |
845 </dd><dt><i>basename</i></dt> |
845 </dd><dt><i>basename</i></dt> |
846 <dd> |
846 <dd> |
847 a path basename. This basename is deleted from |
847 a path basename. This basename is deleted from |
848 the filename of the module file to be cleared. (string) |
848 the filename of the module file to be cleared. (string) |
849 </dd> |
849 </dd> |
850 </dl> |
850 </dl> |
851 <div align="right"><a href="#top">Up</a></div> |
851 <div align="right"><a href="#top">Up</a></div> |
852 <hr /><hr /> |
852 <hr /><hr /> |
853 <a NAME="resetParsedModules" ID="resetParsedModules"></a> |
853 <a NAME="resetParsedModules" ID="resetParsedModules"></a> |
854 <h2>resetParsedModules</h2> |
854 <h2>resetParsedModules</h2> |
855 <b>resetParsedModules</b>(<i></i>) |
855 <b>resetParsedModules</b>(<i></i>) |
856 <p> |
856 <p> |
857 Module function to reset the list of modules already parsed. |
857 Module function to reset the list of modules already parsed. |
858 </p> |
858 </p> |
859 <div align="right"><a href="#top">Up</a></div> |
859 <div align="right"><a href="#top">Up</a></div> |
860 <hr /> |
860 <hr /> |
861 </body></html> |
861 </body></html> |