11 2020 档案
摘要:count = 0 with open('/cm/com.file','rb') as f: while True: buffer = f.read(1024*8192) if not buffer: break count += buffer.count(b"\n") print(count)
阅读全文
摘要:# -*- coding: utf-8 -*- BADREQUEST = 400 UNAUTHORIZED = 401 FORBIDDEN = 403 GONE = 410 TOOMANYREQUESTS = 412 class DnsdbException(Exception): def __in
阅读全文
摘要:import configparser import logging from logging.handlers import RotatingFileHandler config = configparser.ConfigParser() config.read("config", encodin
阅读全文