16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.DebugClients.Python.DebugUtilities</h1> |
23 <h1>eric6.DebugClients.Python.DebugUtilities</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing utilities functions for the debug client. |
26 Module implementing utilities functions for the debug client. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>ArgInfo</td></tr> |
31 <tr><td>ArgInfo</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
|
34 |
31 <table> |
35 <table> |
32 <tr><td>None</td></tr> |
36 <tr><td>None</td></tr> |
33 </table> |
37 </table> |
34 <h3>Functions</h3> |
38 <h3>Functions</h3> |
|
39 |
35 <table> |
40 <table> |
|
41 |
36 <tr> |
42 <tr> |
37 <td><a href="#_getfullargs">_getfullargs</a></td> |
43 <td><a href="#_getfullargs">_getfullargs</a></td> |
38 <td>Protected function to get information about the arguments accepted by a code object.</td> |
44 <td>Protected function to get information about the arguments accepted by a code object.</td> |
39 </tr><tr> |
45 </tr> |
|
46 <tr> |
40 <td><a href="#formatargvalues">formatargvalues</a></td> |
47 <td><a href="#formatargvalues">formatargvalues</a></td> |
41 <td>Function to format an argument spec from the 4 values returned by getargvalues.</td> |
48 <td>Function to format an argument spec from the 4 values returned by getargvalues.</td> |
42 </tr><tr> |
49 </tr> |
|
50 <tr> |
43 <td><a href="#getargvalues">getargvalues</a></td> |
51 <td><a href="#getargvalues">getargvalues</a></td> |
44 <td>Function to get information about arguments passed into a particular frame.</td> |
52 <td>Function to get information about arguments passed into a particular frame.</td> |
45 </tr><tr> |
53 </tr> |
|
54 <tr> |
46 <td><a href="#prepareJsonCommand">prepareJsonCommand</a></td> |
55 <td><a href="#prepareJsonCommand">prepareJsonCommand</a></td> |
47 <td>Function to prepare a single command or response for transmission to the IDE.</td> |
56 <td>Function to prepare a single command or response for transmission to the IDE.</td> |
48 </tr> |
57 </tr> |
49 </table> |
58 </table> |
50 <hr /><hr /> |
59 <hr /> |
|
60 <hr /> |
51 <a NAME="_getfullargs" ID="_getfullargs"></a> |
61 <a NAME="_getfullargs" ID="_getfullargs"></a> |
52 <h2>_getfullargs</h2> |
62 <h2>_getfullargs</h2> |
53 <b>_getfullargs</b>(<i>co</i>) |
63 <b>_getfullargs</b>(<i>co</i>) |
|
64 |
54 <p> |
65 <p> |
55 Protected function to get information about the arguments accepted |
66 Protected function to get information about the arguments accepted |
56 by a code object. |
67 by a code object. |
57 </p><dl> |
68 </p> |
|
69 <dl> |
|
70 |
58 <dt><i>co</i> (code)</dt> |
71 <dt><i>co</i> (code)</dt> |
59 <dd> |
72 <dd> |
60 reference to a code object to be processed |
73 reference to a code object to be processed |
61 </dd> |
74 </dd> |
62 </dl><dl> |
75 </dl> |
|
76 <dl> |
63 <dt>Returns:</dt> |
77 <dt>Returns:</dt> |
64 <dd> |
78 <dd> |
65 tuple of four things, where 'args' and 'kwonlyargs' are lists of |
79 tuple of four things, where 'args' and 'kwonlyargs' are lists of |
66 argument names, and 'varargs' and 'varkw' are the names of the |
80 argument names, and 'varargs' and 'varkw' are the names of the |
67 * and ** arguments or None. |
81 * and ** arguments or None. |
68 </dd> |
82 </dd> |
69 </dl><dl> |
83 </dl> |
|
84 <dl> |
|
85 |
70 <dt>Raises <b>TypeError</b>:</dt> |
86 <dt>Raises <b>TypeError</b>:</dt> |
71 <dd> |
87 <dd> |
72 raised if the input parameter is not a code object |
88 raised if the input parameter is not a code object |
73 </dd> |
89 </dd> |
74 </dl> |
90 </dl> |
75 <div align="right"><a href="#top">Up</a></div> |
91 <div align="right"><a href="#top">Up</a></div> |
76 <hr /><hr /> |
92 <hr /> |
|
93 <hr /> |
77 <a NAME="formatargvalues" ID="formatargvalues"></a> |
94 <a NAME="formatargvalues" ID="formatargvalues"></a> |
78 <h2>formatargvalues</h2> |
95 <h2>formatargvalues</h2> |
79 <b>formatargvalues</b>(<i>args, varargs, varkw, localsDict, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value)</i>) |
96 <b>formatargvalues</b>(<i>args, varargs, varkw, localsDict, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value)</i>) |
|
97 |
80 <p> |
98 <p> |
81 Function to format an argument spec from the 4 values returned |
99 Function to format an argument spec from the 4 values returned |
82 by getargvalues. |
100 by getargvalues. |
83 </p><dl> |
101 </p> |
|
102 <dl> |
|
103 |
84 <dt><i>args</i> (list of str)</dt> |
104 <dt><i>args</i> (list of str)</dt> |
85 <dd> |
105 <dd> |
86 list of argument names |
106 list of argument names |
87 </dd><dt><i>varargs</i> (str)</dt> |
107 </dd> |
|
108 <dt><i>varargs</i> (str)</dt> |
88 <dd> |
109 <dd> |
89 name of the variable arguments |
110 name of the variable arguments |
90 </dd><dt><i>varkw</i> (str)</dt> |
111 </dd> |
|
112 <dt><i>varkw</i> (str)</dt> |
91 <dd> |
113 <dd> |
92 name of the keyword arguments |
114 name of the keyword arguments |
93 </dd><dt><i>localsDict</i> (dict)</dt> |
115 </dd> |
|
116 <dt><i>localsDict</i> (dict)</dt> |
94 <dd> |
117 <dd> |
95 reference to the local variables dictionary |
118 reference to the local variables dictionary |
96 </dd><dt><i>formatarg=</i> (func)</dt> |
119 </dd> |
|
120 <dt><i>formatarg=</i> (func)</dt> |
97 <dd> |
121 <dd> |
98 argument formatting function |
122 argument formatting function |
99 </dd><dt><i>formatvarargs=</i> (func)</dt> |
123 </dd> |
|
124 <dt><i>formatvarargs=</i> (func)</dt> |
100 <dd> |
125 <dd> |
101 variable arguments formatting function |
126 variable arguments formatting function |
102 </dd><dt><i>formatvarkw=</i> (func)</dt> |
127 </dd> |
|
128 <dt><i>formatvarkw=</i> (func)</dt> |
103 <dd> |
129 <dd> |
104 keyword arguments formatting function |
130 keyword arguments formatting function |
105 </dd><dt><i>formatvalue=</i> (func)</dt> |
131 </dd> |
|
132 <dt><i>formatvalue=</i> (func)</dt> |
106 <dd> |
133 <dd> |
107 value formating functtion |
134 value formating functtion |
108 </dd> |
135 </dd> |
109 </dl><dl> |
136 </dl> |
|
137 <dl> |
110 <dt>Returns:</dt> |
138 <dt>Returns:</dt> |
111 <dd> |
139 <dd> |
112 formatted call signature |
140 formatted call signature |
113 </dd> |
141 </dd> |
114 </dl><dl> |
142 </dl> |
|
143 <dl> |
115 <dt>Return Type:</dt> |
144 <dt>Return Type:</dt> |
116 <dd> |
145 <dd> |
117 str |
146 str |
118 </dd> |
147 </dd> |
119 </dl> |
148 </dl> |
120 <div align="right"><a href="#top">Up</a></div> |
149 <div align="right"><a href="#top">Up</a></div> |
121 <hr /><hr /> |
150 <hr /> |
|
151 <hr /> |
122 <a NAME="getargvalues" ID="getargvalues"></a> |
152 <a NAME="getargvalues" ID="getargvalues"></a> |
123 <h2>getargvalues</h2> |
153 <h2>getargvalues</h2> |
124 <b>getargvalues</b>(<i>frame</i>) |
154 <b>getargvalues</b>(<i>frame</i>) |
|
155 |
125 <p> |
156 <p> |
126 Function to get information about arguments passed into a |
157 Function to get information about arguments passed into a |
127 particular frame. |
158 particular frame. |
128 </p><dl> |
159 </p> |
|
160 <dl> |
|
161 |
129 <dt><i>frame</i> (frame)</dt> |
162 <dt><i>frame</i> (frame)</dt> |
130 <dd> |
163 <dd> |
131 reference to a frame object to be processed |
164 reference to a frame object to be processed |
132 </dd> |
165 </dd> |
133 </dl><dl> |
166 </dl> |
|
167 <dl> |
134 <dt>Returns:</dt> |
168 <dt>Returns:</dt> |
135 <dd> |
169 <dd> |
136 tuple of four things, where 'args' is a list of the argument names, |
170 tuple of four things, where 'args' is a list of the argument names, |
137 'varargs' and 'varkw' are the names of the * and ** arguments or None |
171 'varargs' and 'varkw' are the names of the * and ** arguments or None |
138 and 'locals' is the locals dictionary of the given frame. |
172 and 'locals' is the locals dictionary of the given frame. |
139 </dd> |
173 </dd> |
140 </dl><dl> |
174 </dl> |
|
175 <dl> |
|
176 |
141 <dt>Raises <b>TypeError</b>:</dt> |
177 <dt>Raises <b>TypeError</b>:</dt> |
142 <dd> |
178 <dd> |
143 raised if the input parameter is not a frame object |
179 raised if the input parameter is not a frame object |
144 </dd> |
180 </dd> |
145 </dl> |
181 </dl> |
146 <div align="right"><a href="#top">Up</a></div> |
182 <div align="right"><a href="#top">Up</a></div> |
147 <hr /><hr /> |
183 <hr /> |
|
184 <hr /> |
148 <a NAME="prepareJsonCommand" ID="prepareJsonCommand"></a> |
185 <a NAME="prepareJsonCommand" ID="prepareJsonCommand"></a> |
149 <h2>prepareJsonCommand</h2> |
186 <h2>prepareJsonCommand</h2> |
150 <b>prepareJsonCommand</b>(<i>method, params</i>) |
187 <b>prepareJsonCommand</b>(<i>method, params</i>) |
|
188 |
151 <p> |
189 <p> |
152 Function to prepare a single command or response for transmission to |
190 Function to prepare a single command or response for transmission to |
153 the IDE. |
191 the IDE. |
154 </p><dl> |
192 </p> |
|
193 <dl> |
|
194 |
155 <dt><i>method</i> (str)</dt> |
195 <dt><i>method</i> (str)</dt> |
156 <dd> |
196 <dd> |
157 command or response name to be sent |
197 command or response name to be sent |
158 </dd><dt><i>params</i> (dict)</dt> |
198 </dd> |
|
199 <dt><i>params</i> (dict)</dt> |
159 <dd> |
200 <dd> |
160 dictionary of named parameters for the command or response |
201 dictionary of named parameters for the command or response |
161 </dd> |
202 </dd> |
162 </dl><dl> |
203 </dl> |
|
204 <dl> |
163 <dt>Returns:</dt> |
205 <dt>Returns:</dt> |
164 <dd> |
206 <dd> |
165 prepared JSON command or response string |
207 prepared JSON command or response string |
166 </dd> |
208 </dd> |
167 </dl><dl> |
209 </dl> |
|
210 <dl> |
168 <dt>Return Type:</dt> |
211 <dt>Return Type:</dt> |
169 <dd> |
212 <dd> |
170 str |
213 str |
171 </dd> |
214 </dd> |
172 </dl> |
215 </dl> |