当前位置: 首页>>代码示例>>Python>>正文


Python Connector.submitJobLocallyAndWait方法代码示例

本文整理汇总了Python中connector.Connector.submitJobLocallyAndWait方法的典型用法代码示例。如果您正苦于以下问题:Python Connector.submitJobLocallyAndWait方法的具体用法?Python Connector.submitJobLocallyAndWait怎么用?Python Connector.submitJobLocallyAndWait使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在connector.Connector的用法示例。


在下文中一共展示了Connector.submitJobLocallyAndWait方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: MainWindow

# 需要导入模块: from connector import Connector [as 别名]
# 或者: from connector.Connector import submitJobLocallyAndWait [as 别名]

#.........这里部分代码省略.........
            else:
                self.jobname_str = str(self.jobname.text())
            
        if not Prj2sinWrap.createCommand(self):  # returns True if cmd was created
            return 
        
        if self.print_cmd.isChecked():  # prints full CLS if checked 
            if not self.debugTextField():
                 return
        
        if self.job.submitJob(Prj2sinWrap.cmd):
            self.statusBar().showMessage('Job successfully submitted: '+ \
                                         strftime('%H:%M:%S - %x'))
            
            
    def calcSingleSlice(self):
        '''
        This method is launched when pressing "Single Slice" button
        from the GUI. It's similar to "submitToCluster", however, it
        doesn't utilize the "createCommand" method. Instead, it creates
        the command line string (CLS) by calling
        "createSingleSliceCommand" and in the end displays the image.
        '''
        Prj2sinWrap.createSingleSliceCommand(self)

        if self.print_cmd.isChecked():
            if not self.debugTextField():
                 return

        # Create path for reconstructed single slice image
        self.dirs.createSingleSliceImagePath()
        
        if self.openinfiji.isChecked():
            self.job.submitJobLocallyAndWait('fiji -eval \"close(\\"'+ \
                                    str(self.prefix.text())+'*\\");\"')
        
        if self.dirs.checkIfFileExist(self.dirs.img_reco):
            self.job.submitJobLocallyAndWait('rm '+self.dirs.img_reco)
        
        # after all checks completed, singleSliceFunc is called and we wait until image is done
        self.job.submitJob(Prj2sinWrap.cmd)
        
        for kk in range(30):
            if self.dirs.checkIfFileExist(self.dirs.img_reco):
                break
            else:
                sleep(0.5)
        else:
            self.displayErrorMessage('No reconstructed slice found', \
                'After waiting 15 sec the reconstructed slice was not found')
            return
                                    
        # we display the image
        if self.openinfiji.isChecked():
            self.job.submitJobLocally('fiji -eval \"open(\\"'+self.dirs.img_reco+'\\")\"')
        else:
            self.displayImageBig(self.dirs.img_reco)
        
        
    def checkComputingLocation(self):
        '''
        This method makes sure that the radiobox from where GRecoMan is
        run, is checked because it is needed for creating the correct
        directory paths.
        '''
        if not self.afsaccount.isChecked() and not self.cons2.isChecked():
开发者ID:habi,项目名称:grecoman,代码行数:70,代码来源:main.py


注:本文中的connector.Connector.submitJobLocallyAndWait方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。