removed regex replacement and used str.replace function instead

This commit is contained in:
glenntanner3 2015-05-18 18:39:29 -04:00
parent 2ccf541835
commit 2a4919e85f

View file

@ -17,8 +17,6 @@
from gi.repository import GObject,Gdk from gi.repository import GObject,Gdk
import re
class interface_manager(GObject.GObject): class interface_manager(GObject.GObject):
""" This class allows to automatically generate variables for a GLADE interface, """ This class allows to automatically generate variables for a GLADE interface,
set the widgets in the interface to their values, and copy the current values set the widgets in the interface to their values, and copy the current values
@ -77,7 +75,7 @@ class interface_manager(GObject.GObject):
The default value can be a text or None """ The default value can be a text or None """
if (default_value != None): if (default_value != None):
exec('self.'+text_name+' = "'+re.sub('\"','\\\"', str(default_value))+'"') exec('self.'+text_name+' = "'+str(default_value).replace('\"','\\"')+'"')
else: else:
exec('self.'+text_name+' = None') exec('self.'+text_name+' = None')
self.interface_text.append( (text_name, callback) ) self.interface_text.append( (text_name, callback) )