Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py

changeset 3119
8b19074bb239
parent 2893
150de635fa29
child 3142
55030c09e142
child 3160
209a07d7e401
diff -r b1278ba1d7fe -r 8b19074bb239 Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Sat Nov 30 16:33:11 2013 +0100
+++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Sat Nov 30 18:01:00 2013 +0100
@@ -613,7 +613,7 @@
         @param checked state of the Python 2 button (boolean)
         """
         # set the checkboxes
-        self.localeCheckBox.setHidden(not checked)
+        self.localeCheckBox.setEnabled(checked)
         if checked:
             self.unicodeCheckBox.setText(self.trUtf8("Unicode"))
         else:
@@ -672,10 +672,11 @@
         code = ''
         if self.importCheckBox.isChecked():
             code += 'import re{0}{1}'.format(os.linesep, istring)
-        code += '{0} = re.compile(r"""{1}"""'.format(
-            reVar, regexp.replace('"', '\\"'))
+        code += '{0} = re.compile('.format(reVar)
+        code += '{0}{1}r"""{2}"""'.format(
+            os.linesep, i1string, regexp.replace('"', '\\"'))
         if flags:
-            code += ', {0}{1}{2}'.format(os.linesep, i1string, flags)
+            code += ',{0}{1}{2}'.format(os.linesep, i1string, flags)
         code += '){0}'.format(estring)
         return code
 

eric ide

mercurial