Created
March 19, 2009 04:37
-
-
Save certik/81596 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from IPython.kernel import client | |
mec = client.MultiEngineClient() | |
mec.get_ids() | |
mec.execute("import socket") | |
print mec.execute("print socket.__file__") | |
def fails(): | |
e = 1/0 | |
mec.push_function(dict(fails=fails)) | |
try: | |
print mec.execute('fails()') | |
except: | |
t, v, tr = sys.exc_info() | |
print v | |
v.raise_exception() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment