--- a/wx/lib/docview.py +++ b/wx/lib/docview.py @@ -1034,7 +1034,7 @@ class DocTemplate(wx.Object): string will be displayed in the file filter list of Windows file selectors. - filter is an appropriate file filter such as \*.txt. + filter is an appropriate file filter such as *.txt. dir is the default directory to use for file selectors. --- a/wx/lib/layoutf.py +++ b/wx/lib/layoutf.py @@ -132,8 +132,8 @@ class Layoutf(wx.LayoutConstraints): 'r': 'wx.Right', 'h': 'wx.Height', 'w': 'wx.Width', 'x': 'wx.CentreX', 'y': 'wx.CentreY' } - rexp1 = re.compile('^\s*([tlrbhwxy])\s*([!\?\*])\s*(\d*)\s*$') - rexp2 = re.compile('^\s*([tlrbhwxy])\s*([=%<>^_])\s*([tlrbhwxy]?)\s*(\d*)\s*#(\d+)\s*$') + rexp1 = re.compile(r'^\s*([tlrbhwxy])\s*([!\?\*])\s*(\d*)\s*$') + rexp2 = re.compile(r'^\s*([tlrbhwxy])\s*([=%<>^_])\s*([tlrbhwxy]?)\s*(\d*)\s*#(\d+)\s*$') def __init__(self,pstr=None,winlist=None): wx.LayoutConstraints.__init__(self) --- a/wx/lib/wxpTag.py +++ b/wx/lib/wxpTag.py @@ -45,7 +45,7 @@ The name-value pairs in all the nested P strings into a python dictionary and passed to the __init__ method of the class as keyword arguments. This means that they are all accessible from the __init__ method as regular parameters, or you use -the special Python \*\*kw syntax in your __init__ method to get the +the special Python **kw syntax in your __init__ method to get the dictionary directly. Some parameter values are special and if they are present then they will --- a/wx/tools/pywxrc.py +++ b/wx/tools/pywxrc.py @@ -521,7 +521,7 @@ class XmlResourceCompiler: # Generate subclasses for subclass in subclasses: windowClass = bases[subclass] - subclass = re.sub("^\S+\.", "", subclass) + subclass = re.sub(r"^\S+\.", "", subclass) windowClass = re.sub("^wx", "", windowClass) outputList.append(self.templates.SUBCLASS_HEADER % locals()) outputList.append('\n') @@ -766,8 +766,8 @@ class XmlResourceCompiler: \n => \\n \r => \\r \t => \\t - \ => \\ - " => \" + \\ => \\\\ + " => \\" Returns result as string, which is bytes in py2 or unicode in py3. """