X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/29a41103aad2860742a6d71942c9b9e14fe4a79d..68fc5c8025e38b9d827383fbfe7ce509ae331c1f:/wxPython/wx/tools/XRCed/xrced.py diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index 4d9c55aa22..e47b62f287 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -373,6 +373,8 @@ class Frame(wx.Frame): wx.SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR) if dlg.ShowModal() == wx.ID_OK: path = dlg.GetPath() + if isinstance(path, unicode): + path = path.encode(sys.getfilesystemencoding()) dlg.Destroy() else: dlg.Destroy() @@ -427,7 +429,7 @@ class Frame(wx.Frame): try: import wx.tools.pywxrc rescomp = wx.tools.pywxrc.XmlResourceCompiler() - rescomp.MakePythonModule(dataFile, pypath, embed, genGettext) + rescomp.MakePythonModule([dataFile], pypath, embed, genGettext) except: inf = sys.exc_info() wx.LogError(traceback.format_exception(inf[0], inf[1], None)[-1]) @@ -1257,7 +1259,7 @@ class PythonOptions(wx.Dialog): if self.cfg.Read("filename", "") != "": self.FileNameTC.SetValue(self.cfg.Read("filename")) else: - name = os.path.splitext(dataFile)[0] + name = os.path.splitext(os.path.split(dataFile)[1])[0] name += '_xrc.py' self.FileNameTC.SetValue(name) self.AutoGenerateCB.SetValue(self.cfg.ReadBool("autogenerate", False))