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