本文整理汇总了Python中skeinforge_tools.skeinforge_utilities.gcodec.getTextIfEmpty函数的典型用法代码示例。如果您正苦于以下问题:Python getTextIfEmpty函数的具体用法?Python getTextIfEmpty怎么用?Python getTextIfEmpty使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getTextIfEmpty函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Write scalable vector graphics for a skeinforge gcode file, if activate vectorwrite is selected."
vectorwritePreferences = preferences.getReadRepository( VectorwritePreferences() )
if not vectorwritePreferences.activateVectorwrite.value:
return
gcodeText = gcodec.getTextIfEmpty( fileName, gcodeText )
writeGivenPreferences( fileName, gcodeText, vectorwritePreferences )
示例2: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Display a skeinviewed gcode file for a skeinforge gcode file, if 'Activate Skeinview' is selected."
skeinviewPreferences = SkeinviewPreferences()
preferences.getReadPreferences( skeinviewPreferences )
if skeinviewPreferences.activateSkeinview.value:
gcodeText = gcodec.getTextIfEmpty( fileName, gcodeText )
displayFileGivenText( fileName, gcodeText, skeinviewPreferences )
示例3: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Write scalable vector graphics for a skeinforge gcode file, if activate vectorwrite is selected."
repository = settings.getReadRepository( VectorwriteRepository() )
if not repository.activateVectorwrite.value:
return
gcodeText = gcodec.getTextIfEmpty( fileName, gcodeText )
analyzeFileGivenText( fileName, gcodeText, repository )
示例4: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Write a beholded gcode file for a skeinforge gcode file, if 'Activate Behold' is selected."
beholdPreferences = BeholdPreferences()
preferences.getReadPreferences( beholdPreferences )
if beholdPreferences.activateBehold.value:
gcodeText = gcodec.getTextIfEmpty( fileName, gcodeText )
displayBeholdFileGivenText( fileName, gcodeText, beholdPreferences )
示例5: writeOutput
def writeOutput( fileName = '', gcodeText = '' ):
"Analyze a gcode file. If no fileName is specified, comment the first gcode file in this folder that is not modified."
gcodeText = gcodec.getTextIfEmpty( fileName, gcodeText )
pluginFilenames = getPluginFilenames()
for pluginFilename in pluginFilenames:
analyzePluginsDirectoryPath = getPluginsDirectoryPath()
pluginModule = gcodec.getModuleWithDirectoryPath( analyzePluginsDirectoryPath, pluginFilename )
if pluginModule != None:
pluginModule.writeOutput( fileName, gcodeText )
示例6: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Analyze a gcode file."
gcodeText = gcodec.getTextIfEmpty( fileName, gcodeText )
pluginFileNames = getPluginFileNames()
for pluginFileName in pluginFileNames:
analyzePluginsDirectoryPath = getPluginsDirectoryPath()
pluginModule = gcodec.getModuleWithDirectoryPath( analyzePluginsDirectoryPath, pluginFileName )
if pluginModule != None:
pluginModule.writeOutput( fileName, gcodeText )
示例7: getCraftedText
def getCraftedText(fileName, text="", carvePreferences=None):
"Get carved text."
if gcodec.getHasSuffix(fileName, ".svg"):
text = gcodec.getTextIfEmpty(fileName, text)
return text
return getCraftedTextFromFileName(fileName, carvePreferences=None)
示例8: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Display a skeinviewed gcode file for a skeinforge gcode file, if 'Activate Skeinview' is selected."
repository = settings.getReadRepository( SkeinviewRepository() )
if repository.activateSkeinview.value:
gcodeText = gcodec.getTextIfEmpty( fileName, gcodeText )
analyzeFileGivenText( fileName, gcodeText, repository )
示例9: getCraftedText
def getCraftedText( fileName, text, homePreferences = None ):
"Home a gcode linear move file or text."
return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), homePreferences )
示例10: getCraftedText
def getCraftedText( fileName, text, stretchRepository = None ):
"Stretch a gcode linear move text."
return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), stretchRepository )
示例11: getCraftedText
def getCraftedText( fileName, text = '', chamberRepository = None ):
"Chamber the file or text."
return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), chamberRepository )
示例12: getCraftedText
def getCraftedText( fileName, text, coolPreferences = None ):
"Cool a gcode linear move text."
return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), coolPreferences )
示例13: getCraftedText
def getCraftedText( fileName, text, combRepository = None ):
"Comb a gcode linear move text."
return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), combRepository )
示例14: getCraftedText
def getCraftedText( fileName, text, clipRepository = None ):
"Clip a gcode linear move file or text."
return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), clipRepository )
示例15: getCraftedText
def getCraftedText( fileName, text = '', liftPreferences = None ):
"Lift the preface file or text."
return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), liftPreferences )