54 self.setFoldComments(Preferences.getEditor("PythonFoldComment")) |
56 self.setFoldComments(Preferences.getEditor("PythonFoldComment")) |
55 self.setFoldQuotes(Preferences.getEditor("PythonFoldString")) |
57 self.setFoldQuotes(Preferences.getEditor("PythonFoldString")) |
56 if not Preferences.getEditor("PythonAutoIndent"): |
58 if not Preferences.getEditor("PythonAutoIndent"): |
57 self.setAutoIndentStyle(QsciScintilla.AiMaintain) |
59 self.setAutoIndentStyle(QsciScintilla.AiMaintain) |
58 try: |
60 try: |
59 self.setV2UnicodeAllowed(Preferences.getEditor("PythonAllowV2Unicode")) |
61 self.setV2UnicodeAllowed( |
60 self.setV3BinaryOctalAllowed(Preferences.getEditor("PythonAllowV3Binary")) |
62 Preferences.getEditor("PythonAllowV2Unicode")) |
|
63 self.setV3BinaryOctalAllowed( |
|
64 Preferences.getEditor("PythonAllowV3Binary")) |
61 self.setV3BytesAllowed(Preferences.getEditor("PythonAllowV3Bytes")) |
65 self.setV3BytesAllowed(Preferences.getEditor("PythonAllowV3Bytes")) |
62 except AttributeError: |
66 except AttributeError: |
63 pass |
67 pass |
64 try: |
68 try: |
65 self.setFoldQuotes(Preferences.getEditor("PythonFoldQuotes")) |
69 self.setFoldQuotes(Preferences.getEditor("PythonFoldQuotes")) |
123 |
127 |
124 def isCommentStyle(self, style): |
128 def isCommentStyle(self, style): |
125 """ |
129 """ |
126 Public method to check, if a style is a comment style. |
130 Public method to check, if a style is a comment style. |
127 |
131 |
|
132 @param style style to check (integer) |
128 @return flag indicating a comment style (boolean) |
133 @return flag indicating a comment style (boolean) |
129 """ |
134 """ |
130 return style in [QsciLexerPython.Comment, |
135 return style in [QsciLexerPython.Comment, |
131 QsciLexerPython.CommentBlock] |
136 QsciLexerPython.CommentBlock] |
132 |
137 |
133 def isStringStyle(self, style): |
138 def isStringStyle(self, style): |
134 """ |
139 """ |
135 Public method to check, if a style is a string style. |
140 Public method to check, if a style is a string style. |
136 |
141 |
|
142 @param style style to check (integer) |
137 @return flag indicating a string style (boolean) |
143 @return flag indicating a string style (boolean) |
138 """ |
144 """ |
139 return style in [QsciLexerPython.DoubleQuotedString, |
145 return style in [QsciLexerPython.DoubleQuotedString, |
140 QsciLexerPython.SingleQuotedString, |
146 QsciLexerPython.SingleQuotedString, |
141 QsciLexerPython.TripleDoubleQuotedString, |
147 QsciLexerPython.TripleDoubleQuotedString, |