##// END OF EJS Templates
client.run is now like %run, not TaskClient.run
client.run is now like %run, not TaskClient.run

File last commit:

r3609:8d078bcc
r3620:5bcc9665
Show More
remotefunction.py
22 lines | 413 B | text/x-python | PythonLexer
from IPython.zmq.parallel.client import *
client = Client()
@remote(client, bound=True)
def getkey(name):
"""fetch something from globals"""
return globals().get(name)
@remote(client, bound=True, targets='all')
def setpids():
import os
globals()['pid'] = os.getpid()
# set pid in the globals
setpids()
getkey('pid')
getkey.targets=[1,2]
getkey('pid')
getkey.bound=False
getkey('pid') is None