Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py

branch
Py2 comp.
changeset 3142
55030c09e142
parent 3056
9986ec0e559a
parent 3119
8b19074bb239
child 3145
a9de05d4a22f
diff -r 72f3bde98c58 -r 55030c09e142 Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Fri Dec 13 22:45:47 2013 +0100
+++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Fri Dec 13 23:39:14 2013 +0100
@@ -615,7 +615,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:
@@ -674,10 +674,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