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