摘要:
import re findall 返回的是列表 大小w:[每个元素都是字符串的形式]# \w 字母.数字.下划线.中文 *** print(re.findall("\w","宝元-alex_dsb123日魔吃D烧饼")) # \w 不是字母.数字.下划线.中文 ***print(re.findal 阅读全文
摘要:
手动挡import logginglogging.basicConfig( lever = logging.DEBUG, format = '%(asctime)s %(filename)s [line:%(lineno)d] %(levelname)s %(message)s', datefmt 阅读全文
摘要:
软件开发规范 阅读全文
摘要:
# 粘包现象 # serverimport socket sk = socket.socket()sk.bind(('127.0.0.1', 8005))sk.listen() conn, addr = sk.accept()conn.send(b'123')conn.send(b'123') # 阅读全文
摘要:
# serverimport osimport socketimport hashlibSECRET_KEY = b'alexbigsb' def check_client(conn): randbytes = os.urandom(32) conn.send(randbytes) md5 = ha 阅读全文