Skip to content

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

Open
@smelike

Description

@smelike

使用 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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions