11:b0996e4a289e | 12:1d8dd9706f46 |
---|---|
10 import re | 10 import re |
11 | 11 |
12 from PyQt4.QtCore import QObject, SIGNAL, QRegExp | 12 from PyQt4.QtCore import QObject, SIGNAL, QRegExp |
13 from PyQt4.Qsci import QsciLexerPython | 13 from PyQt4.Qsci import QsciLexerPython |
14 | 14 |
15 from CompleterBase import CompleterBase | 15 from .CompleterBase import CompleterBase |
16 | 16 |
17 import Preferences | 17 import Preferences |
18 | 18 |
19 class CompleterPython(CompleterBase): | 19 class CompleterPython(CompleterBase): |
20 """ | 20 """ |
86 """ | 86 """ |
87 Public slot called to handle the user entering a character. | 87 Public slot called to handle the user entering a character. |
88 | 88 |
89 @param charNumber value of the character entered (integer) | 89 @param charNumber value of the character entered (integer) |
90 """ | 90 """ |
91 char = unichr(charNumber) | 91 char = chr(charNumber) |
92 if char not in ['(', ')', '{', '}', '[', ']', ' ', ',', "'", '"', '\n', ':']: | 92 if char not in ['(', ')', '{', '}', '[', ']', ' ', ',', "'", '"', '\n', ':']: |
93 return # take the short route | 93 return # take the short route |
94 | 94 |
95 line, col = self.editor.getCursorPosition() | 95 line, col = self.editor.getCursorPosition() |
96 | 96 |