本文整理汇总了Python中Version.AppVerName.replace方法的典型用法代码示例。如果您正苦于以下问题:Python AppVerName.replace方法的具体用法?Python AppVerName.replace怎么用?Python AppVerName.replace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Version.AppVerName
的用法示例。
在下文中一共展示了AppVerName.replace方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from Version import AppVerName [as 别名]
# 或者: from Version.AppVerName import replace [as 别名]
platform = 'Linux'
six.print_( 'Copying help, template and image files into the build folder...' )
resourceDirs = ['CrossMgrHtml', 'CrossMgrHtmlDoc', 'CrossMgrHelpIndex', 'CrossMgrImages']
dest = os.path.join('CrossMgrBuild', 'dist', 'CrossMgr')
for d in resourceDirs:
shutil.copytree( d, os.path.join(dest, d) )
if platform == 'OSX':
dest = os.path.join('CrossMgrBuild', 'CrossMgr.app', 'Contents', 'Resources')
for d in resourceDirs:
shutil.copytree( d, os.path.join(dest, d) )
# Check if 32 or 64 bit.
import struct
bits = '{}bit'.format( struct.calcsize("P") * 8 )
from Version import AppVerName
fname = platform + '_' + bits + '_' + AppVerName.replace(' ', '_') + '.tar.gz'
fname = os.path.join( 'CrossMgrBuild', fname )
six.print_( 'Combining and compressing the build directory...' )
import tarfile
tr = tarfile.open( fname, 'w:gz' )
tr.add( dest, 'CrossMgr' )
tr.close()
six.print_( 'Created:', fname )
six.print_( 'Done.' )