本文整理汇总了Python中skeinforge_tools.skeinforge_utilities.interpret.getImportPluginFilenames函数的典型用法代码示例。如果您正苦于以下问题:Python getImportPluginFilenames函数的具体用法?Python getImportPluginFilenames怎么用?Python getImportPluginFilenames使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getImportPluginFilenames函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: execute
def execute(self):
"Comb button has been clicked."
fileNames = polyfile.getFileOrDirectoryTypesUnmodifiedGcode(
self.fileNameInput.value, interpret.getImportPluginFilenames(), self.fileNameInput.wasCancelled
)
for fileName in fileNames:
writeOutput(fileName)
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:7,代码来源:comb.py
示例2: getCarving
def getCarving( fileName ):
"Get a carving for the file using an import plugin."
importPluginFilenames = interpret.getImportPluginFilenames()
for importPluginFilename in importPluginFilenames:
fileTypeDot = '.' + importPluginFilename
if fileName[ - len( fileTypeDot ) : ].lower() == fileTypeDot:
importPluginsDirectoryPath = gcodec.getAbsoluteFolderPath( os.path.dirname( __file__ ), 'import_plugins' )
pluginModule = gcodec.getModuleWithDirectoryPath( importPluginsDirectoryPath, importPluginFilename )
if pluginModule != None:
return pluginModule.getCarving( fileName )
print( 'Could not find plugin to handle ' + fileName )
return None
开发者ID:TeamTeamUSA,项目名称:ReplicatorG,代码行数:12,代码来源:svg_codec.py
示例3: writeOutput
def writeOutput( fileName = '' ):
"Chop a GNU Triangulated Surface file. If no fileName is specified, chop the first GNU Triangulated Surface file in this folder."
if fileName == '':
unmodified = gcodec.getFilesWithFileTypesWithoutWords( interpret.getImportPluginFilenames() )
if len( unmodified ) == 0:
print( "There are no carvable files in this folder." )
return
fileName = unmodified[ 0 ]
startTime = time.time()
print( 'File ' + gcodec.getSummarizedFilename( fileName ) + ' is being chopped.' )
chopGcode = getCraftedText( fileName )
if chopGcode == '':
return
suffixFilename = fileName[ : fileName.rfind( '.' ) ] + '_chop.svg'
suffixDirectoryName = os.path.dirname( suffixFilename )
suffixReplacedBaseName = os.path.basename( suffixFilename ).replace( ' ', '_' )
suffixFilename = os.path.join( suffixDirectoryName, suffixReplacedBaseName )
gcodec.writeFileText( suffixFilename, chopGcode )
print( 'The chopped file is saved as ' + gcodec.getSummarizedFilename( suffixFilename ) )
print( 'It took ' + str( int( round( time.time() - startTime ) ) ) + ' seconds to chop the file.' )
preferences.openWebPage( suffixFilename )
开发者ID:TeamTeamUSA,项目名称:SkeinFox,代码行数:21,代码来源:chop.py
注:本文中的skeinforge_tools.skeinforge_utilities.interpret.getImportPluginFilenames函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论