from threading import Thread from multiprocessing import Process def f1(): name = input('请输入名字') #EOFError: EOF when reading a line # print(name) # if __name__ == '__main__': # input('主进程输入') # p = Process(target=f1,) # p.start() # # print('主进程结束') # if __name__ == '__main__': # input('主进程输入') p = Thread(target=f1,) p.start() print('主进程结束')