摘要:
def loginfo(info): # create logger logger = logging.getLogger('【cpu and mem】**********') # Set default log level logger.setLevel(logging.DEBUG) ch = logging.StreamHandler() ... 阅读全文
摘要:
file_data = '' str1 = '1' str2 = '2' with open(loginfofile, 'r+') as f: #打开文件,r+模式,读取 for line in f: if str1 in line: line = line.replace(str... 阅读全文
摘要:
#-*- coding: UTF-8 -*- import argparse import sysif len(sys.argv) == 1: sys.argv.append('--help') parser = argparse.ArgumentParser() parser.add_argument('-o','--host',help="talent IP") parser.add... 阅读全文