本文整理汇总了Python中file.File.projectfileFromName方法的典型用法代码示例。如果您正苦于以下问题:Python File.projectfileFromName方法的具体用法?Python File.projectfileFromName怎么用?Python File.projectfileFromName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类file.File
的用法示例。
在下文中一共展示了File.projectfileFromName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getProjectfileTimestamps
# 需要导入模块: from file import File [as 别名]
# 或者: from file.File import projectfileFromName [as 别名]
def getProjectfileTimestamps(name):
projectfile = File.projectfileFromName(name)
timestamps = {}
timestamps["creation"] = File.fileCreationTimestamp(projectfile)
timestamps["modification"] = File.fileModificationTimestamp(projectfile)
return timestamps
示例2: fineopenproject
# 需要导入模块: from file import File [as 别名]
# 或者: from file.File import projectfileFromName [as 别名]
def fineopenproject(name, verbose):
audacity_project = File.projectfileFromName(name)
Compression.FineCompression.finedecompress(name, verbose)
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
Compression.FineCompression.finecompress(name, verbose)
示例3: openproject
# 需要导入模块: from file import File [as 别名]
# 或者: from file.File import projectfileFromName [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)