Dirk Meyer wrote: > Jason Tackaberry wrote: >> rpc = kaa.rpc.Server('pingtest') > > Note: pingtest is the name of the unix socket, you can replace it with > a tuple of hostname and port to get a unix socket. In that case you > should add a second parameter as shared secret as some sort of > password. > > | rpc = kaa.rpc.Server(('myaddr', 5000), 'very_secret') > >> rpc.connect(ping) > > You can either connect exposed functions or an object. In case you > connect an object, all exposed functions in that object are > connected. This avoids a lot of code. > > | class Foo(object): > | > | @kaa.rpc.expose('func1') > | def foo(self): > | return 1 > | > | @kaa.rpc.expose('func2') > | def bar(self): > | return 1 > | > | rpc.connect(Foo())
Very simple, thanks Had to read up about decorators first and found this thread http://mail.python.org/pipermail/python-list/2007-July/450300.html which at the end provided the helpwithdebug.py module. I wonder if this could be of any use in freevo? Duncan
rpcserver.py
Description: application/python
rpcclient.py
Description: application/python
helpwithdebug.py
Description: application/python
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel