eric6/Documentation/Source/eric6.DebugClients.Python.ModuleLoader.html

changeset 7890
c7b98271f551
child 7898
1bcd6d4df182
equal deleted inserted replaced
7889:c6af59ed8c17 7890:c7b98271f551
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.DebugClients.Python.ModuleLoader</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>
22 <a NAME="top" ID="top"></a>
23 <h1>eric6.DebugClients.Python.ModuleLoader</h1>
24
25 <p>
26 Module implementing an import hook patching modules to support debugging.
27 </p>
28 <h3>Global Attributes</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <h3>Classes</h3>
34
35 <table>
36
37 <tr>
38 <td><a href="#ModuleLoader">ModuleLoader</a></td>
39 <td>Class implementing an import hook patching modules to support debugging.</td>
40 </tr>
41 </table>
42 <h3>Functions</h3>
43
44 <table>
45 <tr><td>None</td></tr>
46 </table>
47 <hr />
48 <hr />
49 <a NAME="ModuleLoader" ID="ModuleLoader"></a>
50 <h2>ModuleLoader</h2>
51
52 <p>
53 Class implementing an import hook patching modules to support debugging.
54 </p>
55 <h3>Derived from</h3>
56 object
57 <h3>Class Attributes</h3>
58
59 <table>
60 <tr><td>None</td></tr>
61 </table>
62 <h3>Class Methods</h3>
63
64 <table>
65 <tr><td>None</td></tr>
66 </table>
67 <h3>Methods</h3>
68
69 <table>
70
71 <tr>
72 <td><a href="#ModuleLoader.__init__">ModuleLoader</a></td>
73 <td>Constructor</td>
74 </tr>
75 <tr>
76 <td><a href="#ModuleLoader.__loadModule">__loadModule</a></td>
77 <td>Private method to load a module.</td>
78 </tr>
79 <tr>
80 <td><a href="#ModuleLoader.create_module">create_module</a></td>
81 <td>Public method to create a module based on the passed in spec.</td>
82 </tr>
83 <tr>
84 <td><a href="#ModuleLoader.exec_module">exec_module</a></td>
85 <td>Public method to execute the created module.</td>
86 </tr>
87 <tr>
88 <td><a href="#ModuleLoader.find_module">find_module</a></td>
89 <td>Public method returning the module loader.</td>
90 </tr>
91 <tr>
92 <td><a href="#ModuleLoader.find_spec">find_spec</a></td>
93 <td>Public method returning the module spec.</td>
94 </tr>
95 <tr>
96 <td><a href="#ModuleLoader.load_module">load_module</a></td>
97 <td>Public method to load a module.</td>
98 </tr>
99 </table>
100 <h3>Static Methods</h3>
101
102 <table>
103 <tr><td>None</td></tr>
104 </table>
105
106 <a NAME="ModuleLoader.__init__" ID="ModuleLoader.__init__"></a>
107 <h4>ModuleLoader (Constructor)</h4>
108 <b>ModuleLoader</b>(<i>debugClient</i>)
109
110 <p>
111 Constructor
112 </p>
113 <dl>
114
115 <dt><i>debugClient</i> (DebugClient)</dt>
116 <dd>
117 reference to the debug client object
118 </dd>
119 </dl>
120 <a NAME="ModuleLoader.__loadModule" ID="ModuleLoader.__loadModule"></a>
121 <h4>ModuleLoader.__loadModule</h4>
122 <b>__loadModule</b>(<i>fullname</i>)
123
124 <p>
125 Private method to load a module.
126 </p>
127 <dl>
128
129 <dt><i>fullname</i> (str)</dt>
130 <dd>
131 name of the module to be loaded
132 </dd>
133 </dl>
134 <dl>
135 <dt>Returns:</dt>
136 <dd>
137 reference to the loaded module
138 </dd>
139 </dl>
140 <dl>
141 <dt>Return Type:</dt>
142 <dd>
143 module
144 </dd>
145 </dl>
146 <a NAME="ModuleLoader.create_module" ID="ModuleLoader.create_module"></a>
147 <h4>ModuleLoader.create_module</h4>
148 <b>create_module</b>(<i>spec</i>)
149
150 <p>
151 Public method to create a module based on the passed in spec.
152 </p>
153 <dl>
154
155 <dt><i>spec</i> (ModuleSpec)</dt>
156 <dd>
157 module spec object for loading the module
158 </dd>
159 </dl>
160 <dl>
161 <dt>Returns:</dt>
162 <dd>
163 created and patched module
164 </dd>
165 </dl>
166 <dl>
167 <dt>Return Type:</dt>
168 <dd>
169 module
170 </dd>
171 </dl>
172 <a NAME="ModuleLoader.exec_module" ID="ModuleLoader.exec_module"></a>
173 <h4>ModuleLoader.exec_module</h4>
174 <b>exec_module</b>(<i>module</i>)
175
176 <p>
177 Public method to execute the created module.
178 </p>
179 <dl>
180
181 <dt><i>module</i> (module)</dt>
182 <dd>
183 module to be executed
184 </dd>
185 </dl>
186 <a NAME="ModuleLoader.find_module" ID="ModuleLoader.find_module"></a>
187 <h4>ModuleLoader.find_module</h4>
188 <b>find_module</b>(<i>fullname, path=None</i>)
189
190 <p>
191 Public method returning the module loader.
192 </p>
193 <dl>
194
195 <dt><i>fullname</i> (str)</dt>
196 <dd>
197 name of the module to be loaded
198 </dd>
199 <dt><i>path</i> (str)</dt>
200 <dd>
201 path to resolve the module name
202 </dd>
203 </dl>
204 <dl>
205 <dt>Returns:</dt>
206 <dd>
207 module loader object
208 </dd>
209 </dl>
210 <dl>
211 <dt>Return Type:</dt>
212 <dd>
213 object
214 </dd>
215 </dl>
216 <a NAME="ModuleLoader.find_spec" ID="ModuleLoader.find_spec"></a>
217 <h4>ModuleLoader.find_spec</h4>
218 <b>find_spec</b>(<i>fullname, path, target=None</i>)
219
220 <p>
221 Public method returning the module spec.
222 </p>
223 <dl>
224
225 <dt><i>fullname</i> (str)</dt>
226 <dd>
227 name of the module to be loaded
228 </dd>
229 <dt><i>path</i> (str)</dt>
230 <dd>
231 path to resolve the module name
232 </dd>
233 <dt><i>target</i> (module)</dt>
234 <dd>
235 module object to use for a more educated guess
236 about what spec to return
237 </dd>
238 </dl>
239 <dl>
240 <dt>Returns:</dt>
241 <dd>
242 module spec object pointing to the module loader
243 </dd>
244 </dl>
245 <dl>
246 <dt>Return Type:</dt>
247 <dd>
248 ModuleSpec
249 </dd>
250 </dl>
251 <a NAME="ModuleLoader.load_module" ID="ModuleLoader.load_module"></a>
252 <h4>ModuleLoader.load_module</h4>
253 <b>load_module</b>(<i>fullname</i>)
254
255 <p>
256 Public method to load a module.
257 </p>
258 <dl>
259
260 <dt><i>fullname</i> (str)</dt>
261 <dd>
262 name of the module to be loaded
263 </dd>
264 </dl>
265 <dl>
266 <dt>Returns:</dt>
267 <dd>
268 reference to the loaded module
269 </dd>
270 </dl>
271 <dl>
272 <dt>Return Type:</dt>
273 <dd>
274 module
275 </dd>
276 </dl>
277 <div align="right"><a href="#top">Up</a></div>
278 <hr />
279 </body></html>

eric ide

mercurial