摘要: Python threading模块线程有2种调用方式,如下:直接调用12345678910111213141516171819import threadingimport time def sayhi(num): #定义每个线程要运行的函数 print("running on number:%s" %num) time.sleep(3) if __name__ == '__mai... 阅读全文
posted @ 2016-03-11 09:51 Bruce_G 阅读(139) 评论(0) 推荐(0) 编辑
摘要: socketserver.TCPServer Exampleserver side12345678910111213141516171819202122232425262728import socketserver class MyTCPHandler(socketserver.BaseRequestHandler): """ The request handler class for... 阅读全文
posted @ 2016-03-11 09:51 Bruce_G 阅读(183) 评论(0) 推荐(0) 编辑