本文整理汇总了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.")
示例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.' )
示例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' )
示例4: writeOutput
def writeOutput(fileName=""):
"Comb a gcode linear move file."
fileName = interpret.getFirstTranslatorFileNameUnmodified(fileName)
if fileName != "":
consecution.writeChainTextWithNounMessage(fileName, "comb")
示例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' )
示例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")