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

branch
maintenance
changeset 8043
0acf98cd089a
parent 7989
a21d673a8f99
child 8215
fc5d68a6889e
equal deleted inserted replaced
7991:866adc8c315b 8043:0acf98cd089a
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_spec">find_spec</a></td>
89 <td>Public method returning the module spec.</td>
90 </tr>
91 </table>
92 <h3>Static Methods</h3>
93
94 <table>
95 <tr><td>None</td></tr>
96 </table>
97
98 <a NAME="ModuleLoader.__init__" ID="ModuleLoader.__init__"></a>
99 <h4>ModuleLoader (Constructor)</h4>
100 <b>ModuleLoader</b>(<i>debugClient</i>)
101
102 <p>
103 Constructor
104 </p>
105 <dl>
106
107 <dt><i>debugClient</i> (DebugClient)</dt>
108 <dd>
109 reference to the debug client object
110 </dd>
111 </dl>
112 <a NAME="ModuleLoader.__loadModule" ID="ModuleLoader.__loadModule"></a>
113 <h4>ModuleLoader.__loadModule</h4>
114 <b>__loadModule</b>(<i>fullname</i>)
115
116 <p>
117 Private method to load a module.
118 </p>
119 <dl>
120
121 <dt><i>fullname</i> (str)</dt>
122 <dd>
123 name of the module to be loaded
124 </dd>
125 </dl>
126 <dl>
127 <dt>Return:</dt>
128 <dd>
129 reference to the loaded module
130 </dd>
131 </dl>
132 <dl>
133 <dt>Return Type:</dt>
134 <dd>
135 module
136 </dd>
137 </dl>
138 <a NAME="ModuleLoader.create_module" ID="ModuleLoader.create_module"></a>
139 <h4>ModuleLoader.create_module</h4>
140 <b>create_module</b>(<i>spec</i>)
141
142 <p>
143 Public method to create a module based on the passed in spec.
144 </p>
145 <dl>
146
147 <dt><i>spec</i> (ModuleSpec)</dt>
148 <dd>
149 module spec object for loading the module
150 </dd>
151 </dl>
152 <dl>
153 <dt>Return:</dt>
154 <dd>
155 created and patched module
156 </dd>
157 </dl>
158 <dl>
159 <dt>Return Type:</dt>
160 <dd>
161 module
162 </dd>
163 </dl>
164 <a NAME="ModuleLoader.exec_module" ID="ModuleLoader.exec_module"></a>
165 <h4>ModuleLoader.exec_module</h4>
166 <b>exec_module</b>(<i>module</i>)
167
168 <p>
169 Public method to execute the created module.
170 </p>
171 <dl>
172
173 <dt><i>module</i> (module)</dt>
174 <dd>
175 module to be executed
176 </dd>
177 </dl>
178 <a NAME="ModuleLoader.find_spec" ID="ModuleLoader.find_spec"></a>
179 <h4>ModuleLoader.find_spec</h4>
180 <b>find_spec</b>(<i>fullname, path, target=None</i>)
181
182 <p>
183 Public method returning the module spec.
184 </p>
185 <dl>
186
187 <dt><i>fullname</i> (str)</dt>
188 <dd>
189 name of the module to be loaded
190 </dd>
191 <dt><i>path</i> (str)</dt>
192 <dd>
193 path to resolve the module name
194 </dd>
195 <dt><i>target</i> (module)</dt>
196 <dd>
197 module object to use for a more educated guess
198 about what spec to return
199 </dd>
200 </dl>
201 <dl>
202 <dt>Return:</dt>
203 <dd>
204 module spec object pointing to the module loader
205 </dd>
206 </dl>
207 <dl>
208 <dt>Return Type:</dt>
209 <dd>
210 ModuleSpec
211 </dd>
212 </dl>
213 <div align="right"><a href="#top">Up</a></div>
214 <hr />
215 </body></html>

eric ide

mercurial