【发布时间】:2014-09-02 08:25:47
【问题描述】:
我有一个运行 python 进程的 Windows CMD。该进程同时使用 python 多处理和线程运行更多进程。
该进程的所有打印输出都进入同一个 CMD 窗口。有什么办法可以隐藏所有进程输出?
我尝试使用下一个 CMD 命令执行此操作,但它没有隐藏输出。
start "time_tester" C:\Windows\system32\cmd.exe /k C:\Python26\python.exe time_test.py > nul
【问题讨论】:
-
我正在使用 ghostscript 模块,我的问题是隐藏模块输出,而不是我的打印。我也在尝试在 ghostscript 模块上添加: f = open('nul', 'w') sys.stdout = f .. 但没办法
-
你可能想使用子进程
标签: python windows multiprocessing output python-multithreading