ANN: RPyC 3.00 RC2

sebulba tomerfiliba at gmail.com
Sun Oct 26 18:56:16 CET 2008


Release candidate 2 of RPyC 3.00 has been released!

RPyC (Remote Python Call) is a python library for *transparent* and
symmetric RPC and distributed computing.

website:http://rpyc.wikispaces.com
download: http://sourceforge.net/project/showfiles.php?group_id=155578&package_id=173301

here's a short example of the "classic mode" of rpyc:

# start server on host "foo"
# rpyc/servers/classic_server.py

>>> import rpyc
>>> c = rpyc.classic.connect("foo")
>>>
>>> c.modules.os
<module 'os' from '/usr/lib/python2.5/os.pyc'>
>>> c.modules.os.path
<module 'posixpath' from '/usr/lib/python2.5/posixpath.pyc'>
>>> c.modules.os.getcwd()
'/home/tomer/workspace/rpyc/servers'
>>>
>>> x=c.modules.__builtin__.range(10)
>>> x
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> x.append(11)
>>> x
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11]
>>> isinstance(x, list)
True
>>> type(x)
<netref class '__builtin__.list'>
>>> dir(x)
['__add__', '__class__', '__contains__', '__delattr__', '__delitem__',
'__delslice__',
'__doc__', '__eq__', '__ge__', '__getattribute__', '__getitem__',
'__getslice__',
'__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__',
'__le__',
'__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__',
'__reduce_ex__',
'__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__',
'__setslice__',
'__str__', 'append', 'count', 'extend', 'index', 'insert', 'pop',
'remove', 'reverse',
'sort']
>>> import random
>>> random.shuffle(x)
>>> x
[9, 5, 8, 2, 1, 6, 7, 4, 0, 11, 3]
>>>


-tomer


More information about the Python-announce-list mailing list