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