Skip to content

PYTHON IDLE模式下采用MULTIPROCESSING 子进程无法输出 #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
smelike opened this issue Mar 22, 2018 · 0 comments
Open

PYTHON IDLE模式下采用MULTIPROCESSING 子进程无法输出 #17

smelike opened this issue Mar 22, 2018 · 0 comments

Comments

@smelike
Copy link

smelike commented Mar 22, 2018

使用 Python IDLE 无法看进程通信的输出。

搜索后,得到的答案是:

Well, IDLE is a strange thing. In order to "capture" everything what you write using print statements orsys.stdout.write, IDLE "overrides" sys.stdout and 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

不知道你有没有遇到这个问题呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant