예제 #1
0
파일: gui.py 프로젝트: danginsburg/cmp
    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)
예제 #2
0
파일: gui.py 프로젝트: 1d99net/cmp
 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)