摘要:
低配版 import logging logging.debug('debug message') # 调试模式 logging.info('info message') # 正常运转模式 logging.warning('warning message') # 警告模式 logging.error 阅读全文
摘要:
用递归,获得所有文件目录 def read(path, n): file_list = os.listdir(path) # (1)获取目录下所有文件和目录, 通过list返回 for file in file_list: file_path = os.path.join(path, file) # 阅读全文