def onButCopy(self): #logger.info('onButCopy', __name__) cmd = 'cp %s %s' % (self.str_path(), self.get_out_path()) if self.approveCommand(self.but_copy, cmd): #os.system(cmd) fd.procDeployCommand(cmd, 'single-file-manager') if cp.guistatus is not None: cp.guistatus.updateStatusInfo()
def onButDeploy(self): """Deploys the calibration file(s)""" list_of_deploy_commands, list_of_sources = self.get_list_of_deploy_commands_and_sources( ) msg = 'Deploy calibration file(s):' if list_of_deploy_commands == []: msg += 'List of commands IS EMPTY !!!' logger.info(msg, __name__) return list_src_cbx = [[src, True] for src in list_of_sources] resp = gu.changeCheckBoxListInPopupMenu(list_src_cbx, win_title='Confirm Deployment') if resp != 1: logger.info('Deployment is cancelled!', __name__) return #for cmd,[src,cbx] in zip(list_of_deploy_commands, list_src_cbx) : # print cbx, src, '\n', cmd, '\n' # if cbx : fd.procDeployCommand(cmd) for cmd in list_of_deploy_commands: #print 'cmd: ', cmd if self.is_allowed_command(cmd, list_src_cbx): fd.procDeployCommand(cmd, 'calib-dark') if cp.guistatus is not None: cp.guistatus.updateStatusInfo()
def onButCopy(self): #logger.info('onButCopy', __name__) cmd = 'cp %s %s' % (self.str_path(), self.get_out_path()) if self.approveCommand(self.but_copy, cmd) : #os.system(cmd) fd.procDeployCommand(cmd, 'f-manager') if cp.guistatus is not None : cp.guistatus.updateStatusInfo()
def onButDeploy(self): """Deploys the calibration file(s)""" list_of_deploy_commands, list_of_sources = self.get_list_of_deploy_commands_and_sources() msg = 'Deploy calibration file(s):' if list_of_deploy_commands == [] : msg += 'List of commands IS EMPTY !!!' logger.info(msg, __name__) return list_src_cbx = [[src,True] for src in list_of_sources] resp = gu.changeCheckBoxListInPopupMenu(list_src_cbx, win_title='Confirm Deployment') if resp != 1 : logger.info('Deployment is cancelled!', __name__) return #for cmd,[src,cbx] in zip(list_of_deploy_commands, list_src_cbx) : # print cbx, src, '\n', cmd, '\n' # if cbx : fd.procDeployCommand(cmd) for cmd in list_of_deploy_commands : #print 'cmd: ', cmd if self.is_allowed_command(cmd, list_src_cbx) : fd.procDeployCommand(cmd,'calib-dark') if cp.guistatus is not None : cp.guistatus.updateStatusInfo()
def onButMove(self): #logger.info('onButMove', __name__) cmd = 'mv %s %s' % (self.str_path(), self.get_out_path()) if self.approveCommand(self.but_copy, cmd) : #os.system(cmd) fd.procDeployCommand(cmd) self.resetFieldsOnDelete()
def onButMove(self): #logger.info('onButMove', __name__) cmd = 'mv %s %s' % (self.str_path(), self.get_out_path()) if self.approveCommand(self.but_copy, cmd): #os.system(cmd) fd.procDeployCommand(cmd, 'f-manager') self.resetFieldsOnDelete()
def onButDeploy(self): logger.debug('onButDeploy', __name__) if self.script == 'Select': msg = 'Script for processing metrology file is not selected.... Select it first and evaluate constants (Item 4)' logger.warning(msg, __name__) return if self.source_name == 'Select': msg = 'Detector is not selected. Select it first...' logger.warning(msg, __name__) return list_of_cmds = self.list_of_copy_cmds() txt = '\nList of commands for tentetive file deployment:' for cmd in list_of_cmds: txt += '\n' + cmd logger.info(txt, __name__) msg = 'Approve commands \njust printed in the logger' if self.approveCommand(self.butDeploy, msg): for cmd in list_of_cmds: fd.procDeployCommand(cmd, 'metrology-alignment') #print 'Command for deployer: ', cmd if cp.guistatus is not None: cp.guistatus.updateStatusInfo()
def onButDeploy(self): logger.debug('onButDeploy', __name__) if self.script == 'Select' : msg = 'Script for processing metrology file is not selected.... Select it first and evaluate constants (Item 4)' logger.warning(msg, __name__) return if self.source_name == 'Select' : msg = 'Detector is not selected. Select it first...' logger.warning(msg, __name__) return list_of_cmds = self.list_of_copy_cmds() txt = '\nList of commands for tentetive file deployment:' for cmd in list_of_cmds : txt += '\n' + cmd logger.info(txt, __name__) msg = 'Approve commands \njust printed in the logger' if self.approveCommand(self.butDeploy, msg) : for cmd in list_of_cmds : fd.procDeployCommand(cmd, 'metrology-alignment') #print 'Command for deployer: ', cmd if cp.guistatus is not None : cp.guistatus.updateStatusInfo()
def onButCopy(self): logger.info('onButCopy - in implementation', __name__) #return list_of_cmds = self.list_of_group_copy_cmds() if list_of_cmds == []: logger.info( '\nThe list of commands IS EMPTY ! Click on check-box of desired file(s).', __name__) return txt = '\nList of commands for tentetive file deployment:' for cmd in list_of_cmds: txt += '\n' + cmd logger.info(txt, __name__) msg = 'Approve commands \njust printed in the logger' if self.approveCommand(self.but_copy, msg): for cmd in list_of_cmds: fd.procDeployCommand(cmd, 'group-file-manager') # #os.system(cmd) if cp.guistatus is not None: cp.guistatus.updateStatusInfo()
def onButMove(self): #logger.info('onButMove', __name__) cmd = 'mv %s %s' % (self.str_path(), self.get_out_path()) if self.approveCommand(self.but_copy, cmd) : #os.system(cmd) fd.procDeployCommand(cmd, 'single-file-manager') self.resetFieldsOnDelete() if cp.guistatus is not None : cp.guistatus.updateStatusInfo()
def onButCopy(self): #logger.info('onButCopy', __name__) if os.path.basename(self.str_path()) == 'HISTORY' : logger.warning('File %s copy is NOT allowed' % self.str_path(), __name__) return cmd = 'cp %s %s' % (self.str_path(), self.get_out_path()) if self.approveCommand(self.but_copy, cmd) : #os.system(cmd) fd.procDeployCommand(cmd, 'single-file-manager') if cp.guistatus is not None : cp.guistatus.updateStatusInfo()
def onButCopy(self): #logger.info('onButCopy', __name__) if os.path.basename(self.str_path()) == 'HISTORY': logger.warning('File %s copy is NOT allowed' % self.str_path(), __name__) return cmd = 'cp %s %s' % (self.str_path(), self.get_out_path()) if self.approveCommand(self.but_copy, cmd): #os.system(cmd) fd.procDeployCommand(cmd, 'single-file-manager') if cp.guistatus is not None: cp.guistatus.updateStatusInfo()
def onButDeploy(self): """Deploys the calibration file(s)""" list_of_deploy_commands = self.get_list_of_deploy_commands() msg = 'Deploy calibration file(s):' if list_of_deploy_commands == [] : msg += 'List of commands IS EMPTY !!!' logger.info(msg, __name__) return #for cmd in list_of_deploy_commands : # msg += '\n' + cmd #logger.info(msg, __name__) for cmd in list_of_deploy_commands : fd.procDeployCommand(cmd)
def onButDeploy(self): """Deploys the calibration file(s)""" list_of_deploy_commands = self.get_list_of_deploy_commands() msg = 'Deploy calibration file(s):' if list_of_deploy_commands == []: msg += 'List of commands IS EMPTY !!!' logger.info(msg, __name__) return #for cmd in list_of_deploy_commands : # msg += '\n' + cmd #logger.info(msg, __name__) for cmd in list_of_deploy_commands: fd.procDeployCommand(cmd)
def onButCopy(self): logger.debug('onButCopy', __name__) list_of_cmds = self.list_of_group_copy_cmds() if list_of_cmds == [] : logger.info('\nThe list of commands IS EMPTY ! Click on check-box of desired file(s).', __name__) return txt = '\nList of commands for tentetive file deployment:' for cmd in list_of_cmds : txt += '\n' + cmd logger.info(txt, __name__) msg = 'Approve commands \njust printed in the logger' if self.approveCommand(self.but_copy, msg) : for cmd in list_of_cmds : fd.procDeployCommand(cmd, 'group-file-manager') # #os.system(cmd) if cp.guistatus is not None : cp.guistatus.updateStatusInfo()
def onButCopy(self): #logger.info('onButCopy', __name__) cmd = 'cp %s %s' % (self.str_path(), self.get_out_path()) if self.approveCommand(self.but_copy, cmd) : #os.system(cmd) fd.procDeployCommand(cmd)