def _save_fired(self): import pickle import enthought.sweet_pickle as sp import os.path from enthought.pyface.api import FileDialog, OK wildcard = "CMP Configuration State (*.pkl)|*.pkl|" \ "All files (*.*)|*.*" dlg = FileDialog(wildcard=wildcard,title="Filename to store configuration state",\ resizeable=False, action = 'save as', \ default_directory=self.subject_workingdir,) if dlg.open() == OK: if not dlg.path.endswith('.pkl'): dlg.path = dlg.path + '.pkl' self.save_state(dlg.path)