diff --git a/wxPython/wxPython/tools/XRCed/xrced.py b/wxPython/wxPython/tools/XRCed/xrced.py index cb25be9f16..bc5a8513ad 100644 --- a/wxPython/wxPython/tools/XRCed/xrced.py +++ b/wxPython/wxPython/tools/XRCed/xrced.py @@ -527,7 +527,7 @@ class Frame(wxFrame): else: self.toolsSizer.Remove(g.tools) self.toolsSizer.Layout() - + def OnTest(self, evt): if not tree.selection: return # key pressed event tree.ShowTestWindow(tree.selection) @@ -826,6 +826,7 @@ class App(wxApp): global debug # Process comand-line try: + opts = args = [] #give empty values in case of exception opts, args = getopt.getopt(sys.argv[1:], 'dhiv') except getopt.GetoptError: if wxPlatform != '__WXMAC__': # macs have some extra parameters diff --git a/wxPython/wxPython/tools/XRCed/xxx.py b/wxPython/wxPython/tools/XRCed/xxx.py index a135f78fa0..ac93753e72 100644 --- a/wxPython/wxPython/tools/XRCed/xxx.py +++ b/wxPython/wxPython/tools/XRCed/xxx.py @@ -9,6 +9,8 @@ from globals import * from params import * currentEncoding = wxLocale_GetSystemEncodingName() +if not currentEncoding: + currentEncoding = 'ascii' # Base class for interface parameter classes class xxxNode: