摘要:
class BaseRequestHandler: """Base class for request handler classes. This class is instantiated for each request to be handled. The constructor sets t 阅读全文
posted @ 2018-11-17 16:49
rongye
阅读(1238)
评论(0)
推荐(0)
摘要:
http://www.cnblogs.com/alex3714/articles/5830365.html 阅读全文
posted @ 2018-11-17 15:24
rongye
阅读(112)
评论(0)
推荐(0)
摘要:
import hashlibimport socket ,os,timeserver = socket.socket()server.bind(('0.0.0.0',9999) )server.listen()while True: conn, addr = server.accept() prin 阅读全文
posted @ 2018-11-17 11:42
rongye
阅读(149)
评论(0)
推荐(0)
摘要:
import hashlibm = hashlib.md5()m.update(b"test")m.update(b"abc")print(m.hexdigest())m2 = hashlib.md5()m2.update(b"testabc")print(m2.hexdigest()) 阅读全文
posted @ 2018-11-17 11:10
rongye
阅读(223)
评论(0)
推荐(0)
摘要:
import socketclient = socket.socket()#client.connect(('192.168.16.200',9999))client.connect(('localhost',9999))while True: cmd = input(">>:").strip() 阅读全文
posted @ 2018-11-17 03:07
rongye
阅读(376)
评论(0)
推荐(0)
摘要:
静态方法 与类无关,不能访问类里的任何属性和方法类方法 只能访问类变量属性@property 把一个方法变成一个静态属性, flight.status @status.setter flight.status = 3 @status.delter反射 getattr(obj,str) setattr 阅读全文
posted @ 2018-11-17 02:34
rongye
阅读(153)
评论(0)
推荐(0)
摘要:
import importlib __import__('import_lib.metaclass') #这是解释器自己内部用的,到lib层#importlib.import_module('import_lib.metaclass') #与上面这句效果一样,官方建议用这个,到metaclass子层 阅读全文
posted @ 2018-11-17 01:52
rongye
阅读(88)
评论(0)
推荐(0)

浙公网安备 33010602011771号