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