def _load_path_fired(self): dlg = pyface.FileDialog( action='open', wildcard="*.cpath", ) if dlg.open() == pyface.OK: print "Loading:", dlg.path self.load_camera_path(dlg.path)
def _save_path_fired(self): dlg = pyface.FileDialog( action='save as', wildcard="*.cpath", ) if dlg.open() == pyface.OK: print "Saving:", dlg.path self.dump_camera_path(dlg.path)
def _save_function_fired(self): self._redraw() dlg = pyface.FileDialog( action='save as', wildcard="*.ctf", ) if dlg.open() == pyface.OK: print "Saving:", dlg.path tf = self.transfer_function f = open(dlg.path, "wb") cPickle.dump(tf, f)
def _save_button_fired(self): f = pyface.FileDialog(action = 'save as') #wildcard = self.filter) if f.open() == pyface.OK: self.save_image(f.path)
def _save_construction_fired(self): file_dialog = pyface.FileDialog( action='save as', wildcard='Constructions (*.con)|*.con|') if file_dialog.open() == pyface.OK: pickle.dump((self.construction, self.ga), open(file_dialog.path, 'w'))
def _open_construction_fired(self): file_dialog = pyface.FileDialog( action='open', wildcard='Constructions (*.con)|*.con|') if file_dialog.open() == pyface.OK: self.construction, self.ga = pickle.load(open(file_dialog.path))