[OGo-XML-RPC] Pyhton 2.4

Helge Hess xmlrpc@opengroupware.org
Wed, 10 May 2006 14:28:28 +0200


On 10. Mai 2006, at 13:18 Uhr, Adam Tauno Williams wrote:
> Anyone have an example of a Python->OGo XML-RPC call using a modern
> Python 2.4?

http://docs.python.org/lib/module-xmlrpclib.html

> scripts like -
> http://bugzilla.opengroupware.org/bugzilla/attachment.cgi? 
> id=410&action=view - no longer work.

Si. I think you where using the old replacement xmlrpclib provided by  
OGo. With Python 2.0 or so the parameters changed.

> server = xmlrpclib.Server(sys.argv[1],sys.argv[2],sys.argv[3])
> - then it fails with -
...
> AttributeError: 'str' object has no attribute 'request'

I think this is because either the second or the third arguments  
should not be strings.

If I understand it right it should be just:
   s = xmlrpclib.Server("http://user:passwd@localhost/RPC2")

This works for me (Debian Python 2.3).

Greets,
   Helge
-- 
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org