|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Utilities.ClassBrowsers.__init__</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Utilities.ClassBrowsers.__init__</h1> |
|
10 |
|
11 <p> |
|
12 Package implementing class browsers for various languages. |
|
13 </p> |
|
14 <p> |
|
15 Currently it offers class browser support for the following |
|
16 programming languages. |
|
17 </p> |
|
18 <p> |
|
19 <ul> |
|
20 <li>CORBA IDL</li> |
|
21 <li>JavaScript</li> |
|
22 <li>ProtoBuf</li> |
|
23 <li>Python 3</li> |
|
24 <li>Ruby</li> |
|
25 </ul> |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 |
|
29 <table> |
|
30 <tr><td>IDL_SOURCE</td></tr><tr><td>JS_SOURCE</td></tr><tr><td>PROTO_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> |
|
31 </table> |
|
32 <h3>Classes</h3> |
|
33 |
|
34 <table> |
|
35 <tr><td>None</td></tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 |
|
39 <table> |
|
40 |
|
41 <tr> |
|
42 <td><a href="#find_module">find_module</a></td> |
|
43 <td>Module function to extend the Python module finding mechanism.</td> |
|
44 </tr> |
|
45 <tr> |
|
46 <td><a href="#readmodule">readmodule</a></td> |
|
47 <td>Read a source file and return a dictionary of classes, functions, modules, etc.</td> |
|
48 </tr> |
|
49 </table> |
|
50 <hr /> |
|
51 <hr /> |
|
52 <a NAME="find_module" ID="find_module"></a> |
|
53 <h2>find_module</h2> |
|
54 <b>find_module</b>(<i>name, path, isPyFile=False</i>) |
|
55 |
|
56 <p> |
|
57 Module function to extend the Python module finding mechanism. |
|
58 </p> |
|
59 <p> |
|
60 This function searches for files in the given list of paths. If the |
|
61 file name doesn't have an extension or an extension of .py, the normal |
|
62 Python search implemented in the imp module is used. For all other |
|
63 supported files only the paths list is searched. |
|
64 </p> |
|
65 <dl> |
|
66 |
|
67 <dt><i>name</i> (str)</dt> |
|
68 <dd> |
|
69 file name or module name to search for |
|
70 </dd> |
|
71 <dt><i>path</i> (list of str)</dt> |
|
72 <dd> |
|
73 search paths |
|
74 </dd> |
|
75 <dt><i>isPyFile</i> (bool)</dt> |
|
76 <dd> |
|
77 flag indicating a Python file |
|
78 </dd> |
|
79 </dl> |
|
80 <dl> |
|
81 <dt>Return:</dt> |
|
82 <dd> |
|
83 tuple of the open file, pathname and description. Description |
|
84 is a tuple of file suffix, file mode and file type) |
|
85 </dd> |
|
86 </dl> |
|
87 <dl> |
|
88 <dt>Return Type:</dt> |
|
89 <dd> |
|
90 tuple |
|
91 </dd> |
|
92 </dl> |
|
93 <dl> |
|
94 |
|
95 <dt>Raises <b>ImportError</b>:</dt> |
|
96 <dd> |
|
97 The file or module wasn't found. |
|
98 </dd> |
|
99 </dl> |
|
100 <div align="right"><a href="#top">Up</a></div> |
|
101 <hr /> |
|
102 <hr /> |
|
103 <a NAME="readmodule" ID="readmodule"></a> |
|
104 <h2>readmodule</h2> |
|
105 <b>readmodule</b>(<i>module, path=None, isPyFile=False</i>) |
|
106 |
|
107 <p> |
|
108 Read a source file and return a dictionary of classes, functions, modules, |
|
109 etc. . |
|
110 </p> |
|
111 <p> |
|
112 The real work of parsing the source file is delegated to the individual |
|
113 file parsers. |
|
114 </p> |
|
115 <dl> |
|
116 |
|
117 <dt><i>module</i> (str)</dt> |
|
118 <dd> |
|
119 name of the source file |
|
120 </dd> |
|
121 <dt><i>path</i> (list of str)</dt> |
|
122 <dd> |
|
123 list of paths the file should be searched in |
|
124 </dd> |
|
125 <dt><i>isPyFile</i> (bool)</dt> |
|
126 <dd> |
|
127 flag indicating a Python file |
|
128 </dd> |
|
129 </dl> |
|
130 <dl> |
|
131 <dt>Return:</dt> |
|
132 <dd> |
|
133 the resulting dictionary |
|
134 </dd> |
|
135 </dl> |
|
136 <dl> |
|
137 <dt>Return Type:</dt> |
|
138 <dd> |
|
139 dict |
|
140 </dd> |
|
141 </dl> |
|
142 <div align="right"><a href="#top">Up</a></div> |
|
143 <hr /> |
|
144 </body></html> |