Example #1
0
    def onImportPositions(self, event=None):
        curpath = os.getcwd()
        fname = FileOpen(self, 'Import Positions File',
                         wildcard='Position Files (*.pos)|*.pos|All files (*.*)|*.*',
                         default_file='Save.pos')
        if fname is not None:
            self.pospanel.LoadPositions(fname)

        self.write_message('Loaded Positions from File %s' % fname)
        os.chdir(curpath)
Example #2
0
 def onRead(self, event=None):
     fname = FileOpen(self,
                      'Read Configuration File',
                      wildcard='INI (*.ini)|*.ini|All files (*.*)|*.*',
                      default_file='SampleStage.ini')
     if fname is not None:
         self.read_config(fname)
         self.connect_motors()
         self.set_position_list()
     self.write_message('Read Configuration File %s' % fname)
Example #3
0
 def onReadConfig(self, event=None):
     curpath = os.getcwd()
     fname = FileOpen(self, 'Read Configuration File',
                      wildcard='INI (*.ini)|*.ini|All files (*.*)|*.*',
                      default_file='SampleStage.ini')
     if fname is not None:
         self.read_config(fname)
         self.connect_motors()
         self.pospanel.set_positions(self.config['positions'])
     self.write_message('Read Configuration File %s' % fname)
     os.chdir(curpath)
Example #4
0
 def onOpen(self, event=None):
     fname = FileOpen(self,
                      'Open Instrument File',
                      wildcard=EIN_WILDCARD,
                      default_file=self.dbname)
     if fname is not None:
         self.db.close()
         time.sleep(1)
         self.dbname = fname
         self.config.set_current_db(fname)
         self.config.write()
         self.create_nbpages()
Example #5
0
 def onOpen(self, event=None):
     dbname = FileOpen(self,
                       'Open Instrument File',
                       wildcard=EIN_WILDCARD,
                       default_file=self.dbname)
     if dbname is not None:
         self.db.set_hostpid(clear=True)
         self.db.close()
         time.sleep(1)
         self.db, self.dbname = self.connect_db(dbname)
         self.config.set_current_db(dbname)
         self.db.set_hostpid(clear=False)
         self.config.write()
         self.create_nbpages()