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


Python gcodec.getTextIfEmpty函数代码示例

本文整理汇总了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 )
开发者ID:TeamTeamUSA,项目名称:ReplicatorG,代码行数:7,代码来源:vectorwrite.py

示例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 )
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:7,代码来源:skeinview.py

示例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 )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:7,代码来源:vectorwrite.py

示例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 )
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:7,代码来源:behold.py

示例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 )
开发者ID:TeamTeamUSA,项目名称:ReplicatorG,代码行数:9,代码来源:analyze.py

示例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 )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:9,代码来源:analyze.py

示例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)
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:6,代码来源:carve.py

示例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 )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:6,代码来源:skeinview.py

示例9: getCraftedText

def getCraftedText( fileName, text, homePreferences = None ):
	"Home a gcode linear move file or text."
	return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), homePreferences )
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:3,代码来源:home.py

示例10: getCraftedText

def getCraftedText( fileName, text, stretchRepository = None ):
	"Stretch a gcode linear move text."
	return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), stretchRepository )
开发者ID:FarMcKon,项目名称:skeinforge,代码行数:3,代码来源:stretch.py

示例11: getCraftedText

def getCraftedText( fileName, text = '', chamberRepository = None ):
	"Chamber the file or text."
	return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), chamberRepository )
开发者ID:TeamTeamUSA,项目名称:ReplicatorG,代码行数:3,代码来源:chamber.py

示例12: getCraftedText

def getCraftedText( fileName, text, coolPreferences = None ):
	"Cool a gcode linear move text."
	return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), coolPreferences )
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:3,代码来源:cool.py

示例13: getCraftedText

def getCraftedText( fileName, text, combRepository = None ):
	"Comb a gcode linear move text."
	return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), combRepository )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:3,代码来源:comb.py

示例14: getCraftedText

def getCraftedText( fileName, text, clipRepository = None ):
	"Clip a gcode linear move file or text."
	return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), clipRepository )
开发者ID:TeamTeamUSA,项目名称:ReplicatorG,代码行数:3,代码来源:clip.py

示例15: getCraftedText

def getCraftedText( fileName, text = '', liftPreferences = None ):
	"Lift the preface file or text."
	return getCraftedTextFromText( gcodec.getTextIfEmpty( fileName, text ), liftPreferences )
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:3,代码来源:lift.py


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