irrad_control/irrad_interpreter.py
def run(self):
        """This will be run in a dedicated process on calling the Process.start() method"""

        # Setup interpreters zmq connections and logging and daq
        self._setup_interpreter()

        cmd_thread = threading.Thread(target=self.recv_cmd)
        cmd_thread.start()

        # User info
        logging.info('Starting {}'.format(self.name))

        try:

            # Main process runs command receive loop
            self.recv_data()

            # Wait for cmd thread to finish
            cmd_thread.join()

        except Exception:
            logging.exception("Unexpected exception occured.")
            pass

        # Make sure we're closing the data tables
        finally:

            # Close opened data files
            self._close_tables()

            # Overwrite xy stage stats
            with open(os.path.join(package_path, 'devices/stage/xy_stage_config.yaml'), 'w') as _xys:
                yaml.safe_dump(self.stage_config, _xys, default_flow_style=False)

            # User info
            logging.info('{} finished'.format(self.name.capitalize()))
This will be run in a dedicated process on calling the Process.start() method
This will be run in a dedicated process on calling the Process.start() method
This will be run in a dedicated process on calling the Process . start () method
def run(self):
        self._setup_interpreter()
        cmd_thread = threading.Thread(target=self.recv_cmd)
        cmd_thread.start()
        logging.info('Starting {}'.format(self.name))
        try:
            self.recv_data()
            cmd_thread.join()
        except Exception:
            logging.exception("Unexpected exception occured.")
            pass
        finally:
            self._close_tables()
            with open(os.path.join(package_path, 'devices/stage/xy_stage_config.yaml'), 'w') as _xys:
                yaml.safe_dump(self.stage_config, _xys, default_flow_style=False)
            logging.info('{} finished'.format(self.name.capitalize()))
def run ( self ) : self . _setup_interpreter ( ) cmd_thread = threading . Thread ( target = self . recv_cmd ) cmd_thread . start ( ) logging . info ( 'Starting {}' . format ( self . name ) ) try : self . recv_data ( ) cmd_thread . join ( ) except Exception : logging . exception ( "Unexpected exception occured." ) pass finally : self . _close_tables ( ) with open ( os . path . join ( package_path , 'devices/stage/xy_stage_config.yaml' ) , 'w' ) as _xys : yaml . safe_dump ( self . stage_config , _xys , default_flow_style = False ) logging . info ( '{} finished' . format ( self . name . capitalize ( ) ) )
This will be run in a dedicated process on calling the Process.start() method
This will be run in a dedicated process on calling the Process . start () method
"""This will be run in a dedicated process on calling the Process.start() method""" # Setup interpreters zmq connections and logging and daq # User info # Main process runs command receive loop # Wait for cmd thread to finish # Make sure we're closing the data tables # Close opened data files # Overwrite xy stage stats # User info
self