##// END OF EJS Templates
added py4science demos as examples + NetworkX DAG dependencies
added py4science demos as examples + NetworkX DAG dependencies

File last commit:

r3564:b78cec8e
r3564:b78cec8e
Show More
remotefunction.py
22 lines | 436 B | text/x-python | PythonLexer
from IPython.zmq.parallel.client import *
client = Client('tcp://127.0.0.1:10101')
@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