|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric5.QScintilla.TypingCompleters.CompleterPython</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.QScintilla.TypingCompleters.CompleterPython</h1> |
|
12 <p> |
|
13 Module implementing a typing completer for Python. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#CompleterPython">CompleterPython</a></td> |
|
23 <td>Class implementing typing completer for Python.</td> |
|
24 </tr> |
|
25 </table> |
|
26 <h3>Functions</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <hr /><hr /> |
|
31 <a NAME="CompleterPython" ID="CompleterPython"></a> |
|
32 <h2>CompleterPython</h2> |
|
33 <p> |
|
34 Class implementing typing completer for Python. |
|
35 </p> |
|
36 <h3>Derived from</h3> |
|
37 CompleterBase |
|
38 <h3>Class Attributes</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <h3>Methods</h3> |
|
43 <table> |
|
44 <tr> |
|
45 <td><a href="#CompleterPython.__init__">CompleterPython</a></td> |
|
46 <td>Constructor</td> |
|
47 </tr><tr> |
|
48 <td><a href="#CompleterPython.__dedentDefStatement">__dedentDefStatement</a></td> |
|
49 <td>Private method to dedent the line of the def statement to a previous def statement or class statement.</td> |
|
50 </tr><tr> |
|
51 <td><a href="#CompleterPython.__dedentElseToIfWhileForTry">__dedentElseToIfWhileForTry</a></td> |
|
52 <td>Private method to dedent the line of the else statement to the last if, while, for or try statement with less (or equal) indentation.</td> |
|
53 </tr><tr> |
|
54 <td><a href="#CompleterPython.__dedentExceptToTry">__dedentExceptToTry</a></td> |
|
55 <td>Private method to dedent the line of the except statement to the last try statement with less (or equal) indentation.</td> |
|
56 </tr><tr> |
|
57 <td><a href="#CompleterPython.__dedentFinallyToTry">__dedentFinallyToTry</a></td> |
|
58 <td>Private method to dedent the line of the except statement to the last try statement with less (or equal) indentation.</td> |
|
59 </tr><tr> |
|
60 <td><a href="#CompleterPython.__dedentToIf">__dedentToIf</a></td> |
|
61 <td>Private method to dedent the last line to the last if statement with less (or equal) indentation.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#CompleterPython.__inComment">__inComment</a></td> |
|
64 <td>Private method to check, if the cursor is inside a comment</td> |
|
65 </tr><tr> |
|
66 <td><a href="#CompleterPython.__inDoubleQuotedString">__inDoubleQuotedString</a></td> |
|
67 <td>Private method to check, if the cursor is within a double quoted string.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#CompleterPython.__inSingleQuotedString">__inSingleQuotedString</a></td> |
|
70 <td>Private method to check, if the cursor is within a single quoted string.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#CompleterPython.__inTripleDoubleQuotedString">__inTripleDoubleQuotedString</a></td> |
|
73 <td>Private method to check, if the cursor is within a triple double quoted string.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#CompleterPython.__inTripleSingleQuotedString">__inTripleSingleQuotedString</a></td> |
|
76 <td>Private method to check, if the cursor is within a triple single quoted string.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#CompleterPython.__isClassMethod">__isClassMethod</a></td> |
|
79 <td>Private method to check, if the user is defining a class method.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#CompleterPython.__isClassmethodDef">__isClassmethodDef</a></td> |
|
82 <td>Private method to check, if the user is defing a classmethod (@classmethod) method.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#CompleterPython.charAdded">charAdded</a></td> |
|
85 <td>Public slot called to handle the user entering a character.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#CompleterPython.readSettings">readSettings</a></td> |
|
88 <td>Public slot called to reread the configuration parameters.</td> |
|
89 </tr> |
|
90 </table> |
|
91 <a NAME="CompleterPython.__init__" ID="CompleterPython.__init__"></a> |
|
92 <h4>CompleterPython (Constructor)</h4> |
|
93 <b>CompleterPython</b>(<i>editor, parent = None</i>) |
|
94 <p> |
|
95 Constructor |
|
96 </p><dl> |
|
97 <dt><i>editor</i></dt> |
|
98 <dd> |
|
99 reference to the editor object (QScintilla.Editor) |
|
100 </dd><dt><i>parent</i></dt> |
|
101 <dd> |
|
102 reference to the parent object (QObject) |
|
103 </dd> |
|
104 </dl><a NAME="CompleterPython.__dedentDefStatement" ID="CompleterPython.__dedentDefStatement"></a> |
|
105 <h4>CompleterPython.__dedentDefStatement</h4> |
|
106 <b>__dedentDefStatement</b>(<i></i>) |
|
107 <p> |
|
108 Private method to dedent the line of the def statement to a previous def |
|
109 statement or class statement. |
|
110 </p><a NAME="CompleterPython.__dedentElseToIfWhileForTry" ID="CompleterPython.__dedentElseToIfWhileForTry"></a> |
|
111 <h4>CompleterPython.__dedentElseToIfWhileForTry</h4> |
|
112 <b>__dedentElseToIfWhileForTry</b>(<i></i>) |
|
113 <p> |
|
114 Private method to dedent the line of the else statement to the last |
|
115 if, while, for or try statement with less (or equal) indentation. |
|
116 </p><a NAME="CompleterPython.__dedentExceptToTry" ID="CompleterPython.__dedentExceptToTry"></a> |
|
117 <h4>CompleterPython.__dedentExceptToTry</h4> |
|
118 <b>__dedentExceptToTry</b>(<i>hasColon</i>) |
|
119 <p> |
|
120 Private method to dedent the line of the except statement to the last |
|
121 try statement with less (or equal) indentation. |
|
122 </p><dl> |
|
123 <dt><i>hasColon</i></dt> |
|
124 <dd> |
|
125 flag indicating the except type (boolean) |
|
126 </dd> |
|
127 </dl><a NAME="CompleterPython.__dedentFinallyToTry" ID="CompleterPython.__dedentFinallyToTry"></a> |
|
128 <h4>CompleterPython.__dedentFinallyToTry</h4> |
|
129 <b>__dedentFinallyToTry</b>(<i></i>) |
|
130 <p> |
|
131 Private method to dedent the line of the except statement to the last |
|
132 try statement with less (or equal) indentation. |
|
133 </p><a NAME="CompleterPython.__dedentToIf" ID="CompleterPython.__dedentToIf"></a> |
|
134 <h4>CompleterPython.__dedentToIf</h4> |
|
135 <b>__dedentToIf</b>(<i></i>) |
|
136 <p> |
|
137 Private method to dedent the last line to the last if statement with |
|
138 less (or equal) indentation. |
|
139 </p><a NAME="CompleterPython.__inComment" ID="CompleterPython.__inComment"></a> |
|
140 <h4>CompleterPython.__inComment</h4> |
|
141 <b>__inComment</b>(<i>line, col</i>) |
|
142 <p> |
|
143 Private method to check, if the cursor is inside a comment |
|
144 </p><dl> |
|
145 <dt><i>line</i></dt> |
|
146 <dd> |
|
147 current line (integer) |
|
148 </dd><dt><i>col</i></dt> |
|
149 <dd> |
|
150 current position within line (integer) |
|
151 </dd> |
|
152 </dl><dl> |
|
153 <dt>Returns:</dt> |
|
154 <dd> |
|
155 flag indicating, if the cursor is inside a comment (boolean) |
|
156 </dd> |
|
157 </dl><a NAME="CompleterPython.__inDoubleQuotedString" ID="CompleterPython.__inDoubleQuotedString"></a> |
|
158 <h4>CompleterPython.__inDoubleQuotedString</h4> |
|
159 <b>__inDoubleQuotedString</b>(<i></i>) |
|
160 <p> |
|
161 Private method to check, if the cursor is within a double quoted string. |
|
162 </p><dl> |
|
163 <dt>Returns:</dt> |
|
164 <dd> |
|
165 flag indicating, if the cursor is inside a double |
|
166 quoted string (boolean) |
|
167 </dd> |
|
168 </dl><a NAME="CompleterPython.__inSingleQuotedString" ID="CompleterPython.__inSingleQuotedString"></a> |
|
169 <h4>CompleterPython.__inSingleQuotedString</h4> |
|
170 <b>__inSingleQuotedString</b>(<i></i>) |
|
171 <p> |
|
172 Private method to check, if the cursor is within a single quoted string. |
|
173 </p><dl> |
|
174 <dt>Returns:</dt> |
|
175 <dd> |
|
176 flag indicating, if the cursor is inside a single |
|
177 quoted string (boolean) |
|
178 </dd> |
|
179 </dl><a NAME="CompleterPython.__inTripleDoubleQuotedString" ID="CompleterPython.__inTripleDoubleQuotedString"></a> |
|
180 <h4>CompleterPython.__inTripleDoubleQuotedString</h4> |
|
181 <b>__inTripleDoubleQuotedString</b>(<i></i>) |
|
182 <p> |
|
183 Private method to check, if the cursor is within a triple double quoted string. |
|
184 </p><dl> |
|
185 <dt>Returns:</dt> |
|
186 <dd> |
|
187 flag indicating, if the cursor is inside a triple double |
|
188 quoted string (boolean) |
|
189 </dd> |
|
190 </dl><a NAME="CompleterPython.__inTripleSingleQuotedString" ID="CompleterPython.__inTripleSingleQuotedString"></a> |
|
191 <h4>CompleterPython.__inTripleSingleQuotedString</h4> |
|
192 <b>__inTripleSingleQuotedString</b>(<i></i>) |
|
193 <p> |
|
194 Private method to check, if the cursor is within a triple single quoted string. |
|
195 </p><dl> |
|
196 <dt>Returns:</dt> |
|
197 <dd> |
|
198 flag indicating, if the cursor is inside a triple single |
|
199 quoted string (boolean) |
|
200 </dd> |
|
201 </dl><a NAME="CompleterPython.__isClassMethod" ID="CompleterPython.__isClassMethod"></a> |
|
202 <h4>CompleterPython.__isClassMethod</h4> |
|
203 <b>__isClassMethod</b>(<i></i>) |
|
204 <p> |
|
205 Private method to check, if the user is defining a class method. |
|
206 </p><dl> |
|
207 <dt>Returns:</dt> |
|
208 <dd> |
|
209 flag indicating the definition of a class method (boolean) |
|
210 </dd> |
|
211 </dl><a NAME="CompleterPython.__isClassmethodDef" ID="CompleterPython.__isClassmethodDef"></a> |
|
212 <h4>CompleterPython.__isClassmethodDef</h4> |
|
213 <b>__isClassmethodDef</b>(<i></i>) |
|
214 <p> |
|
215 Private method to check, if the user is defing a classmethod |
|
216 (@classmethod) method. |
|
217 </p><dl> |
|
218 <dt>Returns:</dt> |
|
219 <dd> |
|
220 flag indicating the definition of a classmethod method (boolean) |
|
221 </dd> |
|
222 </dl><a NAME="CompleterPython.charAdded" ID="CompleterPython.charAdded"></a> |
|
223 <h4>CompleterPython.charAdded</h4> |
|
224 <b>charAdded</b>(<i>charNumber</i>) |
|
225 <p> |
|
226 Public slot called to handle the user entering a character. |
|
227 </p><dl> |
|
228 <dt><i>charNumber</i></dt> |
|
229 <dd> |
|
230 value of the character entered (integer) |
|
231 </dd> |
|
232 </dl><a NAME="CompleterPython.readSettings" ID="CompleterPython.readSettings"></a> |
|
233 <h4>CompleterPython.readSettings</h4> |
|
234 <b>readSettings</b>(<i></i>) |
|
235 <p> |
|
236 Public slot called to reread the configuration parameters. |
|
237 </p> |
|
238 <div align="right"><a href="#top">Up</a></div> |
|
239 <hr /> |
|
240 </body></html> |