本文整理汇总了Python中connector.Connector.submitJob方法的典型用法代码示例。如果您正苦于以下问题:Python Connector.submitJob方法的具体用法?Python Connector.submitJob怎么用?Python Connector.submitJob使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类connector.Connector
的用法示例。
在下文中一共展示了Connector.submitJob方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: from connector import Connector [as 别名]
# 或者: from connector.Connector import submitJob [as 别名]
#.........这里部分代码省略.........
## Context menus
self.submit.setContextMenuPolicy(Qt.CustomContextMenu); # Submit button
self.singleslice.setContextMenuPolicy(Qt.CustomContextMenu); # Single slice button
QObject.connect(self.submit,SIGNAL("customContextMenuRequested(const QPoint)"),
self.submitAndSingleSliceContextMenu) # Submit button
QObject.connect(self.singleslice,SIGNAL("customContextMenuRequested(const QPoint)"),
self.submitAndSingleSliceContextMenu) # Single slice button
## Set tab order for all fields in GUI
field_order = ['afsaccount','cons2','inputdirectory','setinputdirectory','inputtype',\
'prefix','stitchingtype','raws','darks','flats','interflats','flatfreq',\
'preflatsonly','roion','roi_left','roi_right','roi_upper','roi_lower',\
'binsize','scaleimagefactor','addpostfix','cprdirectory','setcprdirectory',\
'fltpdirectory','setfltpdirectory','sindirectory','setsinogramdirectory',\
'sinograms','sinoslider','recodirectory','setrecodirectory','jobname',\
'pag_energy','pag_pxsize','pag_delta','pag_beta','pag_distance',
'runringremoval','waveletfilterdest','wavelettype','waveletpaddingmode',\
'waveletdecompositionlevel','sigmaingaussfilter','runringremovalstd',\
'ring_std_mode','ring_std_diff','ring_std_ringwidth','filter',\
'cutofffrequency','edgepadding','centerofrotation','outputtype','tifmin',\
'tifmax','shiftcorrection','rotationangle','geometry','zingeron',\
'zinger_thresh','zinger_width','cpron','withlog','paganinon','fltp_fromtif',\
'fltp_fromcpr','sinon','sin_fromtif','sin_fromcpr','sin_fromfltp','steplines'\
,'reconstructon','rec_fromtif','rec_fromsino','openinfiji','submit',\
'jobpriority','clearfields','singleslice','print_cmd','develbranchon']
for key in range(len(field_order)-1):
self.setTabOrder(getattr(self,field_order[key]), getattr(self,field_order[key+1]))
def submitToCluster(self):
'''
This method is launched when pressing the "Submit" button in
the GUI. First, it performs several checks, creates the command
line string (CLS) and finally runs the "submitJob" method from
the job object (see "connector.py").
'''
if not self.checkComputingLocation(): # self-explaining
return
if not ParameterWrap.checkAllParamters(): # missing GUI-fields etc.
return
if not str(self.jobname.text()): # we need a job-name and it cannot
self.jobname_str = 'GRecoM' # start with a digit
else:
if str(self.jobname.text())[0].isdigit():
self.jobname_str = 'z'+str(self.jobname.text())
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