|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric4.Utilities.ClassBrowsers.__init__</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric4.Utilities.ClassBrowsers.__init__</h1> |
|
24 <p> |
|
25 Package implementing class browsers for various languages. |
|
26 </p><p> |
|
27 Currently it offers class browser support for the following |
|
28 programming languages. |
|
29 </p><p> |
|
30 <ul> |
|
31 <li>CORBA IDL</li> |
|
32 <li>Python</li> |
|
33 <li>Ruby</li> |
|
34 </ul> |
|
35 </p> |
|
36 <h3>Global Attributes</h3> |
|
37 <table> |
|
38 <tr><td>IDL_SOURCE</td></tr><tr><td>PTL_SOURCE</td></tr><tr><td>PY_SOURCE</td></tr><tr><td>RB_SOURCE</td></tr><tr><td>SUPPORTED_TYPES</td></tr><tr><td>__extensions</td></tr> |
|
39 </table> |
|
40 <h3>Classes</h3> |
|
41 <table> |
|
42 <tr><td>None</td></tr> |
|
43 </table> |
|
44 <h3>Functions</h3> |
|
45 <table> |
|
46 <tr> |
|
47 <td><a href="#find_module">find_module</a></td> |
|
48 <td>Module function to extend the Python module finding mechanism.</td> |
|
49 </tr><tr> |
|
50 <td><a href="#readmodule">readmodule</a></td> |
|
51 <td>Read a source file and return a dictionary of classes, functions, modules, etc.</td> |
|
52 </tr> |
|
53 </table> |
|
54 <hr /><hr /> |
|
55 <a NAME="find_module" ID="find_module"></a> |
|
56 <h2>find_module</h2> |
|
57 <b>find_module</b>(<i>name, path, isPyFile = False</i>) |
|
58 <p> |
|
59 Module function to extend the Python module finding mechanism. |
|
60 </p><p> |
|
61 This function searches for files in the given path. If the filename |
|
62 doesn't have an extension or an extension of .py, the normal search |
|
63 implemented in the imp module is used. For all other supported files |
|
64 only path is searched. |
|
65 </p><dl> |
|
66 <dt><i>name</i></dt> |
|
67 <dd> |
|
68 filename or modulename to search for (string) |
|
69 </dd><dt><i>path</i></dt> |
|
70 <dd> |
|
71 search path (list of strings) |
|
72 </dd> |
|
73 </dl><dl> |
|
74 <dt>Returns:</dt> |
|
75 <dd> |
|
76 tuple of the open file, pathname and description. Description |
|
77 is a tuple of file suffix, file mode and file type) |
|
78 </dd> |
|
79 </dl><dl> |
|
80 <dt>Raises <b>ImportError</b>:</dt> |
|
81 <dd> |
|
82 The file or module wasn't found. |
|
83 </dd> |
|
84 </dl> |
|
85 <div align="right"><a href="#top">Up</a></div> |
|
86 <hr /><hr /> |
|
87 <a NAME="readmodule" ID="readmodule"></a> |
|
88 <h2>readmodule</h2> |
|
89 <b>readmodule</b>(<i>module, path=[], isPyFile = False</i>) |
|
90 <p> |
|
91 Read a source file and return a dictionary of classes, functions, modules, etc. . |
|
92 </p><p> |
|
93 The real work of parsing the source file is delegated to the individual file |
|
94 parsers. |
|
95 </p><dl> |
|
96 <dt><i>module</i></dt> |
|
97 <dd> |
|
98 name of the source file (string) |
|
99 </dd><dt><i>path</i></dt> |
|
100 <dd> |
|
101 path the file should be searched in (list of strings) |
|
102 </dd> |
|
103 </dl><dl> |
|
104 <dt>Returns:</dt> |
|
105 <dd> |
|
106 the resulting dictionary |
|
107 </dd> |
|
108 </dl> |
|
109 <div align="right"><a href="#top">Up</a></div> |
|
110 <hr /> |
|
111 </body></html> |