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


Python settings.getReadRepository函数代码示例

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


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

示例1: getOutput

def getOutput( gcodeText, binary16ByteRepository = None ):
	"Get the exported version of a gcode file.  This function, isReplaceable and if it's output is not replaceable, writeOutput are the only necessary functions in a skeinforge export plugin."
	if gcodeText == '':
		return ''
	if binary16ByteRepository == None:
		binary16ByteRepository = Binary16ByteRepository()
		settings.getReadRepository( binary16ByteRepository )
	return Binary16ByteSkein().getCraftedGcode( gcodeText, binary16ByteRepository )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:8,代码来源:binary_16_byte.py

示例2: writeOutput

def writeOutput( fileName, gcodeText = '' ):
	"Write the exported version of a gcode file."
	binary16ByteRepository = Binary16ByteRepository()
	settings.getReadRepository( binary16ByteRepository )
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	skeinOutput = getOutput( gcodeText, binary16ByteRepository )
	suffixFileName = fileName[ : fileName.rfind( '.' ) ] + '.' + binary16ByteRepository.fileExtension.value
	gcodec.writeFileText( suffixFileName, skeinOutput )
	print( 'The converted file is saved as ' + gcodec.getSummarizedFileName( suffixFileName ) )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:9,代码来源:binary_16_byte.py

示例3: writeOutput

def writeOutput( fileName, gcodeText = '' ):
	"Write the exported version of a gcode file."
	gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
	repository = GcodeStepRepository()
	settings.getReadRepository( repository )
	output = getOutput( gcodeText, repository )
	suffixFileName = fileName[ : fileName.rfind( '.' ) ] + '_gcode_step.gcode'
	gcodec.writeFileText( suffixFileName, output )
	print( 'The converted file is saved as ' + gcodec.getSummarizedFileName( suffixFileName ) )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:9,代码来源:gcode_step.py

示例4: getCraftedTextFromFileName

def getCraftedTextFromFileName(fileName, repository=None):
    "Chop a shape file."
    carving = svg_codec.getCarving(fileName)
    if carving == None:
        return ""
    if repository == None:
        repository = ChopRepository()
        settings.getReadRepository(repository)
    return ChopSkein().getCarvedSVG(carving, fileName, repository)
开发者ID:bmander,项目名称:skeinforge,代码行数:9,代码来源:chop.py

示例5: writeOutput

def writeOutput( fileName, gcodeText = '' ):
	"Write statistics for a skeinforge gcode file, if 'Write Statistics File for Skeinforge Chain' is selected."
	repository = settings.getReadRepository( StatisticRepository() )
	if gcodeText == '':
		gcodeText = gcodec.getFileText( fileName )
	if repository.activateStatistic.value:
		analyzeFileGivenText( fileName, gcodeText, repository )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:7,代码来源:statistic.py

示例6: getCraftedTextFromText

def getCraftedTextFromText( gcodeText, repository = None ):
	"Inset the preface gcode text."
	if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'inset' ):
		return gcodeText
	if repository == None:
		repository = settings.getReadRepository( InsetRepository() )
	return InsetSkein().getCraftedGcode( gcodeText, repository )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:7,代码来源:inset.py

示例7: getCraftedTextFromText

def getCraftedTextFromText( text, prefaceRepository = None ):
	"Preface and convert an svg text."
	if gcodec.isProcedureDoneOrFileIsEmpty( text, 'preface' ):
		return text
	if prefaceRepository == None:
		prefaceRepository = settings.getReadRepository( PrefaceRepository() )
	return PrefaceSkein().getCraftedGcode( prefaceRepository, text )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:7,代码来源:preface.py

示例8: 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

示例9: writeOutput

def writeOutput( fileName, gcodeText = '' ):
	"Write a commented gcode file for a skeinforge gcode file, if 'Write Commented File for Skeinforge Chain' is selected."
	repository = settings.getReadRepository( CommentRepository() )
	if gcodeText == '':
		gcodeText = gcodec.getFileText( fileName )
	if repository.activateComment.value:
		analyzeFileGivenText( fileName, gcodeText )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:7,代码来源:comment.py

示例10: analyzeFileGivenText

def analyzeFileGivenText( fileName, gcodeText, repository = None ):
	"Display a beholded gcode file for a gcode file."
	if gcodeText == '':
		return ''
	if repository == None:
		repository = settings.getReadRepository( BeholdRepository() )
	skeinWindow = getWindowGivenTextRepository( fileName, gcodeText, repository )
	skeinWindow.updateDeiconify()
开发者ID:FarMcKon,项目名称:skeinforge,代码行数:8,代码来源:behold.py

示例11: analyzeFileGivenText

def analyzeFileGivenText( fileName, gcodeText, repository = None ):
	"Display a gcode file in a skeinview window given the text."
	if gcodeText == '':
		return
	if repository == None:
		repository = settings.getReadRepository( SkeinviewRepository() )
	skeinWindow = getWindowGivenTextRepository( fileName, gcodeText, repository )
	skeinWindow.updateDeiconify()
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:8,代码来源:skeinview.py

示例12: getCraftedTextFromText

def getCraftedTextFromText( gcodeText, repository = None ):
	"Outset the preface gcode text."
	if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'outset' ):
		return gcodeText
	if repository == None:
		repository = settings.getReadRepository( OutsetRepository() )
	if not repository.activateOutset.value:
		return gcodeText
	return OutsetSkein().getCraftedGcode( gcodeText, repository )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:9,代码来源:outset.py

示例13: getCraftedTextFromText

def getCraftedTextFromText(gcodeText, jitterRepository=None):
    "Jitter a gcode linear move text."
    if gcodec.isProcedureDoneOrFileIsEmpty(gcodeText, "jitter"):
        return gcodeText
    if jitterRepository == None:
        jitterRepository = settings.getReadRepository(JitterRepository())
    if not jitterRepository.activateJitter.value:
        return gcodeText
    return JitterSkein().getCraftedGcode(jitterRepository, gcodeText)
开发者ID:jmil,项目名称:SkeinFox,代码行数:9,代码来源:jitter.py

示例14: getCraftedTextFromText

def getCraftedTextFromText( gcodeText, exportRepository = None ):
	"Export a gcode linear move text."
	if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'export' ):
		return gcodeText
	if exportRepository == None:
		exportRepository = settings.getReadRepository( ExportRepository() )
	if not exportRepository.activateExport.value:
		return gcodeText
	return ExportSkein().getCraftedGcode( exportRepository, gcodeText )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:9,代码来源:export.py

示例15: getCraftedTextFromText

def getCraftedTextFromText( gcodeText, oozebaneRepository = None ):
	"Oozebane a gcode linear move text."
	if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'oozebane' ):
		return gcodeText
	if oozebaneRepository == None:
		oozebaneRepository = settings.getReadRepository( OozebaneRepository() )
	if not oozebaneRepository.activateOozebane.value:
		return gcodeText
	return OozebaneSkein().getCraftedGcode( gcodeText, oozebaneRepository )
开发者ID:CNCBASHER,项目名称:skeinforge,代码行数:9,代码来源:oozebane.py


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