随笔分类 - 常用小模块
摘要:pyjsonrpc模块的远程过程调用方法。 # -*- coding:utf-8 -*- #!/usr/bin/env python2.7 # @Author : tianbao # @Contact : gmu1592618@gmail.com # @Time : 2018/7/4 21:49 #
阅读全文
摘要:用python3写了个修改hosts的小脚本,没有技术含量,顺带复习一下文件操作和os、sys模块的内容了。
阅读全文
摘要:import random def Verification_code(n): res=[[chr(i) for i in range(ord('0'),ord('9')+1)], [chr(i) for i in range(ord('a'),ord('z'))], [chr(i) for i i
阅读全文
摘要:#! /usr/bin/env python #coding=utf-8 import logging,os class Logger: def __init__(self, path,clevel = logging.DEBUG,Flevel = logging.DEBUG): self.logg
阅读全文
摘要:import hashlib # MD5算法 # def Md5(n): # m = hashlib.md5() # m=hashlib.sha256() # m.update(n.encode('utf8')) # res = m.hexdigest() # return res # res =
阅读全文