5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.QScintilla.TypingCompleters.CompleterPython</h1> |
9 <h1>eric7.QScintilla.TypingCompleters.CompleterPython</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing a typing completer for Python. |
11 Module implementing a typing completer for Python. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
|
16 <table> |
15 <table> |
17 <tr><td>None</td></tr> |
16 <tr><td>None</td></tr> |
18 </table> |
17 </table> |
|
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#CompleterPython">CompleterPython</a></td> |
22 <td><a href="#CompleterPython">CompleterPython</a></td> |
25 <td>Class implementing typing completer for Python.</td> |
23 <td>Class implementing typing completer for Python.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
28 <table> |
30 <table> |
|
31 |
|
32 <tr> |
29 <tr> |
33 <td><a href="#createCompleter">createCompleter</a></td> |
30 <td><a href="#createCompleter">createCompleter</a></td> |
34 <td>Function to instantiate a typing completer object.</td> |
31 <td>Function to instantiate a typing completer object.</td> |
35 </tr> |
32 </tr> |
36 </table> |
33 </table> |
|
34 |
37 <hr /> |
35 <hr /> |
38 <hr /> |
36 <hr /> |
39 <a NAME="CompleterPython" ID="CompleterPython"></a> |
37 <a NAME="CompleterPython" ID="CompleterPython"></a> |
40 <h2>CompleterPython</h2> |
38 <h2>CompleterPython</h2> |
41 |
|
42 <p> |
39 <p> |
43 Class implementing typing completer for Python. |
40 Class implementing typing completer for Python. |
44 </p> |
41 </p> |
|
42 |
45 <h3>Derived from</h3> |
43 <h3>Derived from</h3> |
46 CompleterBase |
44 CompleterBase |
47 <h3>Class Attributes</h3> |
45 <h3>Class Attributes</h3> |
48 |
|
49 <table> |
46 <table> |
50 <tr><td>None</td></tr> |
47 <tr><td>None</td></tr> |
51 </table> |
48 </table> |
|
49 |
52 <h3>Class Methods</h3> |
50 <h3>Class Methods</h3> |
53 |
|
54 <table> |
51 <table> |
55 <tr><td>None</td></tr> |
52 <tr><td>None</td></tr> |
56 </table> |
53 </table> |
|
54 |
57 <h3>Methods</h3> |
55 <h3>Methods</h3> |
58 |
56 <table> |
59 <table> |
|
60 |
|
61 <tr> |
57 <tr> |
62 <td><a href="#CompleterPython.__init__">CompleterPython</a></td> |
58 <td><a href="#CompleterPython.__init__">CompleterPython</a></td> |
63 <td>Constructor</td> |
59 <td>Constructor</td> |
64 </tr> |
60 </tr> |
65 <tr> |
61 <tr> |
121 <tr> |
117 <tr> |
122 <td><a href="#CompleterPython.readSettings">readSettings</a></td> |
118 <td><a href="#CompleterPython.readSettings">readSettings</a></td> |
123 <td>Public slot called to reread the configuration parameters.</td> |
119 <td>Public slot called to reread the configuration parameters.</td> |
124 </tr> |
120 </tr> |
125 </table> |
121 </table> |
|
122 |
126 <h3>Static Methods</h3> |
123 <h3>Static Methods</h3> |
127 |
|
128 <table> |
124 <table> |
129 <tr><td>None</td></tr> |
125 <tr><td>None</td></tr> |
130 </table> |
126 </table> |
|
127 |
131 |
128 |
132 <a NAME="CompleterPython.__init__" ID="CompleterPython.__init__"></a> |
129 <a NAME="CompleterPython.__init__" ID="CompleterPython.__init__"></a> |
133 <h4>CompleterPython (Constructor)</h4> |
130 <h4>CompleterPython (Constructor)</h4> |
134 <b>CompleterPython</b>(<i>editor, parent=None</i>) |
131 <b>CompleterPython</b>(<i>editor, parent=None</i>) |
135 |
|
136 <p> |
132 <p> |
137 Constructor |
133 Constructor |
138 </p> |
134 </p> |
|
135 |
139 <dl> |
136 <dl> |
140 |
137 |
141 <dt><i>editor</i> (QScintilla.Editor)</dt> |
138 <dt><i>editor</i> (QScintilla.Editor)</dt> |
142 <dd> |
139 <dd> |
143 reference to the editor object |
140 reference to the editor object |
148 </dd> |
145 </dd> |
149 </dl> |
146 </dl> |
150 <a NAME="CompleterPython.__dedentDefStatement" ID="CompleterPython.__dedentDefStatement"></a> |
147 <a NAME="CompleterPython.__dedentDefStatement" ID="CompleterPython.__dedentDefStatement"></a> |
151 <h4>CompleterPython.__dedentDefStatement</h4> |
148 <h4>CompleterPython.__dedentDefStatement</h4> |
152 <b>__dedentDefStatement</b>(<i></i>) |
149 <b>__dedentDefStatement</b>(<i></i>) |
153 |
|
154 <p> |
150 <p> |
155 Private method to dedent the line of the def statement to a previous |
151 Private method to dedent the line of the def statement to a previous |
156 def statement or class statement. |
152 def statement or class statement. |
157 </p> |
153 </p> |
|
154 |
158 <a NAME="CompleterPython.__dedentElseToIfWhileForTry" ID="CompleterPython.__dedentElseToIfWhileForTry"></a> |
155 <a NAME="CompleterPython.__dedentElseToIfWhileForTry" ID="CompleterPython.__dedentElseToIfWhileForTry"></a> |
159 <h4>CompleterPython.__dedentElseToIfWhileForTry</h4> |
156 <h4>CompleterPython.__dedentElseToIfWhileForTry</h4> |
160 <b>__dedentElseToIfWhileForTry</b>(<i></i>) |
157 <b>__dedentElseToIfWhileForTry</b>(<i></i>) |
161 |
|
162 <p> |
158 <p> |
163 Private method to dedent the line of the else statement to the last |
159 Private method to dedent the line of the else statement to the last |
164 if, while, for or try statement with less (or equal) indentation. |
160 if, while, for or try statement with less (or equal) indentation. |
165 </p> |
161 </p> |
|
162 |
166 <a NAME="CompleterPython.__dedentExceptToTry" ID="CompleterPython.__dedentExceptToTry"></a> |
163 <a NAME="CompleterPython.__dedentExceptToTry" ID="CompleterPython.__dedentExceptToTry"></a> |
167 <h4>CompleterPython.__dedentExceptToTry</h4> |
164 <h4>CompleterPython.__dedentExceptToTry</h4> |
168 <b>__dedentExceptToTry</b>(<i></i>) |
165 <b>__dedentExceptToTry</b>(<i></i>) |
169 |
|
170 <p> |
166 <p> |
171 Private method to dedent the line of the except statement to the last |
167 Private method to dedent the line of the except statement to the last |
172 try statement with less (or equal) indentation. |
168 try statement with less (or equal) indentation. |
173 </p> |
169 </p> |
|
170 |
174 <a NAME="CompleterPython.__dedentFinallyToTry" ID="CompleterPython.__dedentFinallyToTry"></a> |
171 <a NAME="CompleterPython.__dedentFinallyToTry" ID="CompleterPython.__dedentFinallyToTry"></a> |
175 <h4>CompleterPython.__dedentFinallyToTry</h4> |
172 <h4>CompleterPython.__dedentFinallyToTry</h4> |
176 <b>__dedentFinallyToTry</b>(<i></i>) |
173 <b>__dedentFinallyToTry</b>(<i></i>) |
177 |
|
178 <p> |
174 <p> |
179 Private method to dedent the line of the except statement to the last |
175 Private method to dedent the line of the except statement to the last |
180 try statement with less (or equal) indentation. |
176 try statement with less (or equal) indentation. |
181 </p> |
177 </p> |
|
178 |
182 <a NAME="CompleterPython.__dedentToIf" ID="CompleterPython.__dedentToIf"></a> |
179 <a NAME="CompleterPython.__dedentToIf" ID="CompleterPython.__dedentToIf"></a> |
183 <h4>CompleterPython.__dedentToIf</h4> |
180 <h4>CompleterPython.__dedentToIf</h4> |
184 <b>__dedentToIf</b>(<i></i>) |
181 <b>__dedentToIf</b>(<i></i>) |
185 |
|
186 <p> |
182 <p> |
187 Private method to dedent the last line to the last if statement with |
183 Private method to dedent the last line to the last if statement with |
188 less (or equal) indentation. |
184 less (or equal) indentation. |
189 </p> |
185 </p> |
|
186 |
190 <a NAME="CompleterPython.__inComment" ID="CompleterPython.__inComment"></a> |
187 <a NAME="CompleterPython.__inComment" ID="CompleterPython.__inComment"></a> |
191 <h4>CompleterPython.__inComment</h4> |
188 <h4>CompleterPython.__inComment</h4> |
192 <b>__inComment</b>(<i>line, col</i>) |
189 <b>__inComment</b>(<i>line, col</i>) |
193 |
|
194 <p> |
190 <p> |
195 Private method to check, if the cursor is inside a comment. |
191 Private method to check, if the cursor is inside a comment. |
196 </p> |
192 </p> |
|
193 |
197 <dl> |
194 <dl> |
198 |
195 |
199 <dt><i>line</i> (int)</dt> |
196 <dt><i>line</i> (int)</dt> |
200 <dd> |
197 <dd> |
201 current line |
198 current line |
361 </dd> |
358 </dd> |
362 </dl> |
359 </dl> |
363 <a NAME="CompleterPython.charAdded" ID="CompleterPython.charAdded"></a> |
360 <a NAME="CompleterPython.charAdded" ID="CompleterPython.charAdded"></a> |
364 <h4>CompleterPython.charAdded</h4> |
361 <h4>CompleterPython.charAdded</h4> |
365 <b>charAdded</b>(<i>charNumber</i>) |
362 <b>charAdded</b>(<i>charNumber</i>) |
366 |
|
367 <p> |
363 <p> |
368 Public slot called to handle the user entering a character. |
364 Public slot called to handle the user entering a character. |
369 </p> |
365 </p> |
|
366 |
370 <dl> |
367 <dl> |
371 |
368 |
372 <dt><i>charNumber</i> (int)</dt> |
369 <dt><i>charNumber</i> (int)</dt> |
373 <dd> |
370 <dd> |
374 value of the character entered |
371 value of the character entered |
375 </dd> |
372 </dd> |
376 </dl> |
373 </dl> |
377 <a NAME="CompleterPython.readSettings" ID="CompleterPython.readSettings"></a> |
374 <a NAME="CompleterPython.readSettings" ID="CompleterPython.readSettings"></a> |
378 <h4>CompleterPython.readSettings</h4> |
375 <h4>CompleterPython.readSettings</h4> |
379 <b>readSettings</b>(<i></i>) |
376 <b>readSettings</b>(<i></i>) |
380 |
|
381 <p> |
377 <p> |
382 Public slot called to reread the configuration parameters. |
378 Public slot called to reread the configuration parameters. |
383 </p> |
379 </p> |
|
380 |
384 <div align="right"><a href="#top">Up</a></div> |
381 <div align="right"><a href="#top">Up</a></div> |
385 <hr /> |
382 <hr /> |
386 <hr /> |
383 <hr /> |
387 <a NAME="createCompleter" ID="createCompleter"></a> |
384 <a NAME="createCompleter" ID="createCompleter"></a> |
388 <h2>createCompleter</h2> |
385 <h2>createCompleter</h2> |
389 <b>createCompleter</b>(<i>editor, parent=None</i>) |
386 <b>createCompleter</b>(<i>editor, parent=None</i>) |
390 |
|
391 <p> |
387 <p> |
392 Function to instantiate a typing completer object. |
388 Function to instantiate a typing completer object. |
393 </p> |
389 </p> |
|
390 |
394 <dl> |
391 <dl> |
395 |
392 |
396 <dt><i>editor</i> (QScintilla.Editor)</dt> |
393 <dt><i>editor</i> (QScintilla.Editor)</dt> |
397 <dd> |
394 <dd> |
398 reference to the editor object |
395 reference to the editor object |