[pypy-svn] r47097 - pypy/dist/demo/distribution

fijal at codespeak.net fijal at codespeak.net
Tue Oct 2 12:51:02 CEST 2007


Author: fijal
Date: Tue Oct  2 12:51:01 2007
New Revision: 47097

Modified:
   pypy/dist/demo/distribution/client.py
   pypy/dist/demo/distribution/server.py
Log:
Improve comments.


Modified: pypy/dist/demo/distribution/client.py
==============================================================================
--- pypy/dist/demo/distribution/client.py	(original)
+++ pypy/dist/demo/distribution/client.py	Tue Oct  2 12:51:01 2007
@@ -14,3 +14,22 @@
 import code
 code.interact(local=locals())
 
+""" 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
+try:
+  x.meth() # wrong argument numbers
+except:
+  import sys
+  e, c, tb = sys.exc_info()
+  import pdb
+  pdb.post_mortem(tb)
+"""

Modified: pypy/dist/demo/distribution/server.py
==============================================================================
--- pypy/dist/demo/distribution/server.py	(original)
+++ pypy/dist/demo/distribution/server.py	Tue Oct  2 12:51:01 2007
@@ -27,6 +27,9 @@
 # object
 x = X()
 
+# module
+import sys
+
 # constants
 HOST = '127.0.0.1'
 PORT = 12222



More information about the Pypy-commit mailing list