【发布时间】:2018-07-22 12:21:37
【问题描述】:
我有一个 python 程序,我在其中使用多处理创建了一个新进程 但是在打印 FreeConsole() “检查”之后,该函数似乎没有运行,但之后在 sendme() 下没有任何代码工作,主函数在它之后工作。实际上我希望函数 sendme 在没有控制台的情况下在后台运行
import multiprocessing as mp
def sendme():
import win32console as con
print("check")
con.FreeConsole()
f=open ("hello2.txt",'w')
f.close()
if name=="__main__":
p=mp.Process(target=sendme)
p.start()
print ("main")
【问题讨论】:
标签: python-3.x winapi