Skip to content

Instantly share code, notes, and snippets.

@certik
Created March 19, 2009 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save certik/81596 to your computer and use it in GitHub Desktop.
Save certik/81596 to your computer and use it in GitHub Desktop.
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