pypy / demo / distribution /

""" This a sample client, suitable for use with from this

run by:

HOST = ''
PORT = 12222

from distributed.socklayer import connect
remote_handle = connect((HOST, PORT))

import code

""" Things that can be done: 1. remote object access

x = remote_handle.x
assert type(x) is remote_handle.X # typecheck
x.meth(lambda x: x + 10, 6) # remote call, with callback localy
x.meth(remote_handle.f, 3) # remote call, remote callback
remote_handle.sys._getframe(2).f_locals['x'] # remote frame access
# XXX should be 'is x' and shouldn't need (2) argument

# XXX next one does not work, while it should. Too much mangling with remote
# traceback frames probably
  x.meth(1, 2) # non-callable argument, AssertionError
  import sys
  e, c, tb = sys.exc_info()
  import pdb
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.