当前位置: 首页>>代码示例>>Python>>正文


Python Library.deleteFiles方法代码示例

本文整理汇总了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
开发者ID:cragusa,项目名称:cocoma,代码行数:21,代码来源:Logger.py

示例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:
开发者ID:cragusa,项目名称:cocoma,代码行数:33,代码来源:ccmsh.py


注:本文中的Library.deleteFiles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。