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()
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])
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))