Skip to content
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

IPython console: multiprocessing print output goes to kernel not client #1082

Closed
spyder-bot opened this issue Feb 17, 2015 · 5 comments
Closed

Comments

@spyder-bot
Copy link
Collaborator

From r.lup...@gmail.com on 2012-06-06T06:29:47Z

Spyder Version: 2.2.0dev (2162: re67793ec2995 )
Python Version: 2.7.2
Qt Version: 4.7.3, PyQt4 (API v2) 4.8.5 on Windows

What steps will reproduce the problem?

Normally standard output from scripts correctly ends up in the IPython console.

Using the multiprocessing module, standard output from subprocesses instead ends up in the kernel (external console) window.

For example, with the script below, "Starting" is printed to the IPython console, while the "hello world"s appear in the kernel window.


from multiprocessing import Process, Lock

def f(l, i):
l.acquire()
print 'hello world', i
l.release()

if name == 'main':
print "Starting"
lock = Lock()
for num in range(10):
Process(target=f, args=(lock, num)).start()

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1082

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2012-06-06T07:07:24Z

This code makes the kernel crash for me on Linux. We'll have to investigate further.

Labels: MS-v2.2

@spyder-bot
Copy link
Collaborator Author

From r.lup...@gmail.com on 2012-06-06T09:07:21Z

The example comes from the multiprocessing documentation, by the way.

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-06-06T11:14:53Z

Have you tried to run this code in IPython Qt Console (I mean outside Spyder with the IPython Qt console application which is shipped with v0.12)?
(I suspect an IPython bug/limitation)

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-02-11T08:46:58Z

This is still failing with the latest 0.14dev. Moving to 2.3 to check it more carefully

Labels: -MS-v2.2 MS-v2.3

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-07-12T18:33:24Z

This is fixed in the upcoming IPython 1.0 release. Please check this issue: ipython/ipython#2438 I also tested your example and now everything is working fine.

Summary: IPython console: multiprocessing print output goes to kernel not client (was: IPython console: subprocess output goes to kernel not client)
Status: Fixed

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

No branches or pull requests

1 participant