Python IDLE模式下采用multiprocessing 子进程无法输出
2012-07-19 10:44
585 查看
参考资料:http://stackoverflow.com/questions/2774585/child-processes-created-with-python-multiprocessing-module-wont-print
Well, IDLE is a strange thing. In order to "capture" everything what you write using
也就是说由于Windows安全机制以及IDLE设计的问题,这个没办法搞定,只能在命令行模式下运行正常。
Well, IDLE is a strange thing. In order to "capture" everything what you write using
sys.stdout.write, IDLE "overrides"
sys.stdoutand replaces it with an object that passes everything back to IDLE so it can print it. I guess when you are starting a new process from
multiprocessing, this hackery is not inherited by the child process, therefore you don't see anything in IDLE. But I'm just guessing here, I don't have a Windows machine at the moment to check it. – Tamás May 6 '10 at 9:10
也就是说由于Windows安全机制以及IDLE设计的问题,这个没办法搞定,只能在命令行模式下运行正常。
相关文章推荐
- Python多进程并发(multiprocessing)用法实例详解
- Python Idle 无法显示行号(上)
- python multiprocessing 创建多进程
- python之multiprocessing创建进程
- why ftp服务器采用多进程模式
- python学习笔记——multiprocessing 多进程组件 Pipe管道
- python 多进程模块 multiprocessing
- 通过python和websocket捕获进程的输出到网页上
- python中的进程、线程(threading、multiprocessing、Queue、subprocess)
- android MainActivity采用singleTask模式时,点击home键无法保存离开前的界面问题
- Python多线程/进程:os、sys、Queue、multiprocessing、threading
- Python多进程并发(multiprocessing)
- multiprocessing 基于进程的“线程式”接口 python
- Python中采用命名管道来做多进程通信
- multiprocessing在python中的高级应用-进程
- Sublime Text 3 控制台运行Python无法输出中文
- Python multiprocessing.Manager介绍和实例(进程间共享数据)
- Python多进程并发(multiprocessing)
- python中的进程、线程(threading、multiprocessing、Queue、subprocess)
- python中正确显示windows系统上其他进程的输出