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


Python interpret.getFirstTranslatorFileNameUnmodified函数代码示例

本文整理汇总了Python中skeinforge_tools.skeinforge_utilities.interpret.getFirstTranslatorFileNameUnmodified函数的典型用法代码示例。如果您正苦于以下问题:Python getFirstTranslatorFileNameUnmodified函数的具体用法?Python getFirstTranslatorFileNameUnmodified怎么用?Python getFirstTranslatorFileNameUnmodified使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: writeOutput

def writeOutput(fileName=""):
    "Export a gcode linear move file."
    fileName = interpret.getFirstTranslatorFileNameUnmodified(fileName)
    if fileName == "":
        return
    exportPreferences = ExportPreferences()
    preferences.getReadPreferences(exportPreferences)
    startTime = time.time()
    print("File " + gcodec.getSummarizedFilename(fileName) + " is being chain exported.")
    suffixFilename = fileName[: fileName.rfind(".")] + "_export." + exportPreferences.fileExtension.value
    gcodeText = gcodec.getGcodeFileText(fileName, "")
    procedures = consecution.getProcedures("export", gcodeText)
    gcodeText = consecution.getChainTextFromProcedures(fileName, procedures[:-1], gcodeText)
    if gcodeText == "":
        return
    analyze.writeOutput(suffixFilename, gcodeText)
    exportChainGcode = getCraftedTextFromText(gcodeText, exportPreferences)
    replacableExportChainGcode = None
    selectedPluginModule = getSelectedPluginModule(exportPreferences.exportPlugins)
    if selectedPluginModule == None:
        replacableExportChainGcode = exportChainGcode
    else:
        if selectedPluginModule.isReplacable():
            replacableExportChainGcode = selectedPluginModule.getOutput(exportChainGcode)
        else:
            selectedPluginModule.writeOutput(suffixFilename, exportChainGcode)
    if replacableExportChainGcode != None:
        replacableExportChainGcode = getReplaced(replacableExportChainGcode)
        gcodec.writeFileText(suffixFilename, replacableExportChainGcode)
        print("The exported file is saved as " + gcodec.getSummarizedFilename(suffixFilename))
    if exportPreferences.alsoSendOutputTo.value != "":
        if replacableExportChainGcode == None:
            replacableExportChainGcode = selectedPluginModule.getOutput(exportChainGcode)
        exec("print >> " + exportPreferences.alsoSendOutputTo.value + ", replacableExportChainGcode")
    print("It took " + str(int(round(time.time() - startTime))) + " seconds to export the file.")
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:35,代码来源:export.py

示例2: writeOutput

def writeOutput( fileName = '' ):
	"Export a gcode linear move file."
	fileName = interpret.getFirstTranslatorFileNameUnmodified( fileName )
	if fileName == '':
		return
	exportRepository = ExportRepository()
	preferences.getReadRepository( exportRepository )
	startTime = time.time()
	print( 'File ' + gcodec.getSummarizedFilename( fileName ) + ' is being chain exported.' )
	suffixFilename = fileName[ : fileName.rfind( '.' ) ] + '_export.' + exportRepository.fileExtension.value
	gcodeText = gcodec.getGcodeFileText( fileName, '' )
	procedures = consecution.getProcedures( 'export', gcodeText )
	gcodeText = consecution.getChainTextFromProcedures( fileName, procedures[ : - 1 ], gcodeText )
	if gcodeText == '':
		return
	analyze.writeOutput( suffixFilename, gcodeText )
	exportChainGcode = getCraftedTextFromText( gcodeText, exportRepository )
	replacableExportChainGcode = None
	selectedPluginModule = getSelectedPluginModule( exportRepository.exportPlugins )
	if selectedPluginModule == None:
		replacableExportChainGcode = exportChainGcode
	else:
		if selectedPluginModule.isReplacable():
			replacableExportChainGcode = selectedPluginModule.getOutput( exportChainGcode )
		else:
			selectedPluginModule.writeOutput( suffixFilename, exportChainGcode )
	if replacableExportChainGcode != None:
		replacableExportChainGcode = getReplaced( replacableExportChainGcode )
		gcodec.writeFileText( suffixFilename, replacableExportChainGcode )
		print( 'The exported file is saved as ' + gcodec.getSummarizedFilename( suffixFilename ) )
	if exportRepository.alsoSendOutputTo.value != '':
		if replacableExportChainGcode == None:
			replacableExportChainGcode = selectedPluginModule.getOutput( exportChainGcode )
		exec( 'print >> ' + exportRepository.alsoSendOutputTo.value + ', replacableExportChainGcode' )
	print( 'It took ' + str( int( round( time.time() - startTime ) ) ) + ' seconds to export the file.' )
开发者ID:TeamTeamUSA,项目名称:ReplicatorG,代码行数:35,代码来源:export.py

示例3: writeOutput

def writeOutput( fileName = '' ):
	"Stretch a gcode linear move file.  Chain stretch the gcode if it is not already stretched.  If no fileName is specified, stretch the first unmodified gcode file in this folder."
	fileName = interpret.getFirstTranslatorFileNameUnmodified( fileName )
	if fileName != '':
		consecution.writeChainTextWithNounMessage( fileName, 'stretch' )
开发者ID:FarMcKon,项目名称:skeinforge,代码行数:5,代码来源:stretch.py

示例4: writeOutput

def writeOutput(fileName=""):
    "Comb a gcode linear move file."
    fileName = interpret.getFirstTranslatorFileNameUnmodified(fileName)
    if fileName != "":
        consecution.writeChainTextWithNounMessage(fileName, "comb")
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:5,代码来源:comb.py

示例5: writeOutput

def writeOutput( fileName = '' ):
	"Preface the carving of a gcode file.  If no fileName is specified, preface the first unmodified gcode file in this folder."
	fileName = interpret.getFirstTranslatorFileNameUnmodified( fileName )
	if fileName == '':
		return
	consecution.writeChainTextWithNounMessage( fileName, 'preface' )
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:6,代码来源:preface.py

示例6: writeOutput

def writeOutput(fileName=""):
    "Whittle the carving of a gcode file.  If no fileName is specified, whittle the first unmodified gcode file in this folder."
    fileName = interpret.getFirstTranslatorFileNameUnmodified(fileName)
    if fileName == "":
        return
    consecution.writeChainTextWithNounMessage(fileName, "whittle")
开发者ID:TeamTeamUSA,项目名称:ReplicatorG,代码行数:6,代码来源:whittle.py


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