[IPython-user] Dissimilar behaviour: from IPython.kernel import client, inside class and on import.
mark starnes
m.starnes05@imperial.ac...
Wed Oct 22 07:45:26 CDT 2008
Hi everyone,
I posted about this before, but got pushed into working on something else
before it could be resolved. This post is to re-visit.
Running the script below generates a hang, if the commented lines are
uncommented. If left commented, all seems well. Can anyone explain why?
In particular, sorry to Brian Granger for not following up on the 9/9/08 post.
Other IPython parallel processing functionality seems ok.
Best regards,
Mark.
test.py:
----------------------------------
# Case 1. Outside class. Uncomment the following three lines.
# from IPython.kernel import client
# mec = client.MultiEngineClient()
# print mec.get_ids()
# Case 2. Inside class.
class Test:
def __init__(self):
from IPython.kernel import client
mec = client.MultiEngineClient()
print mec.get_ids()
--------------------------------------
Results:
Case 1: Hang during the 'mec = ...', line 3
Case 2: a=test.Test()
[0, 1, 2, 3]
More information about the IPython-user
mailing list