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


Python DirectoryChooser.replace方法代码示例

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


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

示例1: run

# 需要导入模块: from ij.io import DirectoryChooser [as 别名]
# 或者: from ij.io.DirectoryChooser import replace [as 别名]
def run():
	bPrintLog(' ', 0)
	bPrintLog('=====================================', 0)
	bPrintLog('Running bAlign_Batch_v7', 0)
	bPrintLog('=====================================', 0)

	if len(sys.argv) < 2:
		print "   We need a hard-drive folder with .tif stacks as input"
		print "	  Usage: ./fiji-macosx bALign_Batch_7 <full-path-to-folder>/"
		# Prompt user for a folder
		sourceFolder = DirectoryChooser("Please Choose A Directory Of .tif Files").getDirectory()
		if not sourceFolder:
			return 0
		strippedFolder = sourceFolder.replace(' ', '')
		if sourceFolder != strippedFolder:
			print 'found a space in specified path. Pease remove spaces and try again.'
			print 'path:', sourceFolder
			errorDialog = GenericDialog('Align Batch 7 Options')
			errorDialog.addMessage('bAlignBatch7 Error !!!')
			errorDialog.addMessage('There can not be any spaces in the path.')
			errorDialog.addMessage('Please remove spaces and try again.')
			errorDialog.addMessage('Offending path is:')
			errorDialog.addMessage(sourceFolder)
			errorDialog.showDialog()
			return 0
	else:
		sourceFolder = sys.argv[1] #assuming it ends in '/'
	
	if not os.path.isdir(sourceFolder):
		bPrintLog('\nERROR: run() did not find folder: ' + sourceFolder + '\n',0)
		return 0

	
	if (Options(sourceFolder)):
		runOneFolder(sourceFolder)

	bPrintLog('=====================================', 0)
	bPrintLog('Done bAlign_Batch_v7', 0)
	bPrintLog('=====================================', 0)
        bPrintLog(' ', 0)
开发者ID:cudmore,项目名称:bob-fiji-plugins,代码行数:42,代码来源:bAlignBatch_v7_2.py


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