from multiprocessing import Process
import os def pro_do(name, func):
print () if __name__ == "__main__":
print( "Parent process id %d" %(os.getpid()))
pro = Process(target=pro_do, args=("test", "dev"))
print ("start child process") pro.start() pro.join()
print ("Process end")
1.用idle来跑出不来6
2.用cmd. 命令:python 6.py
就能跑出来6.原因未知