本文整理汇总了Python中file.File.archiveFromName方法的典型用法代码示例。如果您正苦于以下问题:Python File.archiveFromName方法的具体用法?Python File.archiveFromName怎么用?Python File.archiveFromName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类file.File
的用法示例。
在下文中一共展示了File.archiveFromName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: openproject
# 需要导入模块: from file import File [as 别名]
# 或者: from file.File import archiveFromName [as 别名]
def openproject(name, verbose):
audacity_project = File.projectfileFromName(name)
audacity_data = File.datadirectoryFromName(name)
archive = File.archiveFromName(name)
if File.isCompressed(name):
Compression.ArchiveCompression.decompress(name, verbose, keep=True)
Logger.log(" Open")
process = subprocess.Popen(["audacity", audacity_project])
process.wait() # NOTE: switch to communicate() if wait() blocks the process because of a full pipe
if File.newestDataTimestamp(audacity_data) > File.fileModificationTimestamp(archive):
Logger.log(" Compress changed data files")
Compression.ArchiveCompression.compress(name, verbose, overwrite=True)
else:
Logger.log(" Deleting unchanged data files")
shutil.rmtree(audacity_data)