摘要:
# coding:utf-8 import os import re from multiprocessing import Process def func(file, mode): with open(file, mode, encoding="utf-8") as f: f.write("子进 阅读全文
摘要:
# coding:utf-8 import os from multiprocessing import Process def func(n): print("子进程号: %s 参数: %s" % (os.getpid(), n)) if __name__ == '__main__': print 阅读全文
摘要:
# coding:utf-8 import os import time from multiprocessing import Process def func(): print("func start...") time.sleep(1) print("func end...") print(" 阅读全文
摘要:
# coding:utf-8 import os import time from multiprocessing import Process def func1(): print("5func1 start...") print("6子进程1的进程号>:", os.getpid()) print 阅读全文
摘要:
上次内容回顾## 网络编程```socketosi七层协议tcp udp 传输层的两个常用协议tcp:面向连接的,可靠的,消息格式是面向流的udp:面向无连接的,不可靠的,消息格式是面向包的```#### tcp和udp协议的socket``` #服务端 import socket server = 阅读全文