|
Damjan
gdamjan at mail.net.mk
Tue Jan 20 04:46:32 EST 2004
I've made a mod_python handler very similar to the publisher, but
actually doing xmlrpc. The idea is like this:
Put several python scripts in "/opt/www/RPC2", setup an apache handler
like this:
<Directory /opt/www/RPC2>
SetHandler python-program
PythonHandler mod_python.xmlrpcpublisher
</Directory>
Now every python script in /opt/www/RPC2 is callable with XML-RPC...
Assuming there's a test.py file in /opt/www/RPC2, with a function
helloworld, this is how one would call it:
import xmlrpclib
x = xmlrpclib.ServerProxy('http://localhost/RPC2/test')
print x.helloworld()
This is very crude first version... mainly choped of modpython.publisher
itself...
If you like it, nice - tell me what you like.
If you don't - tell me what.
--
Damjan Georgievski
jabberID: damjan at bagra.net.mk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlrpcpublisher.py.gz
Type: application/x-gunzip
Size: 2500 bytes
Desc: not available
Url : http://mailman.modpython.org/pipermail/mod_python/attachments/20040120/108883be/xmlrpcpublisher.py.bin
|