本文整理汇总了Python中Library.deleteFiles方法的典型用法代码示例。如果您正苦于以下问题:Python Library.deleteFiles方法的具体用法?Python Library.deleteFiles怎么用?Python Library.deleteFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Library
的用法示例。
在下文中一共展示了Library.deleteFiles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: emulationEnd
# 需要导入模块: import Library [as 别名]
# 或者: from Library import deleteFiles [as 别名]
def emulationEnd(emulationName):
"""
IN: job that executes at the end of emulation
DOING: just producing logger notification
OUT: nothing
"""
try:
print "Emulation Time expired, removing extra jobs and stopping running processes"
global emulationEndLogger
msg = {"Action":"Emulation finished","EmulationName":str(emulationName)}
producer.sendmsg(myName,msg)
emulationEndLogger.info(msg)
#emulationEndLogger.info("Emulation '"+str(emulationName)+"' finished.")
Library.removeExtraJobs(emulationName)
Library.killRemainingProcesses()
Library.deleteFiles("/tmp/stressapptestFile", "*") # Remove any stressappTest files left behind from I/O loading
return True
except:
return False
示例2: noExtraOptions
# 需要导入模块: import Library [as 别名]
# 或者: from Library import deleteFiles [as 别名]
return False
else:
print "Please respond with 'yes' or 'no'"
except KeyboardInterrupt,e:
print "\nAction cancelled"
if options.clear_logs:
noExtraOptions(options, "clear_logs")
print "WARNING:\nThis action will wipe every file in the COCOMA/logs directory, do you wish to proceed?\n(y/n)"
yes = set(['yes','y', 'ye','yey', 'Y', 'YES'])
no = set(['no','n','nay', 'NO', 'N'])
try:
choice = raw_input().lower()
if choice in yes:
Library.deleteFiles(HOMEPATH + "/logs/*", ".csv", ".xml", ".txt", ".zip")
elif choice in no:
print "Action cancelled"
return False
else:
print "Please respond with 'yes' or 'no'"
except KeyboardInterrupt,e:
print "\nAction cancelled"
'''
################################
listDistro
###############################
'''
if options.listAllDistro: