Re: Pyhton 2.4

Adam Tauno Williams <[email protected]> Wed, 10 May 2006 09:30:17 -0400
Newsgroups gmane.comp.cms.opengroupware.xmlrpc.devel
Message-ID <1147267817.9031.8.camel@localhost>
> > > 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).
> Yep, this works - 
> #!/usr/bin/env python
> import xmlrpclib
> server =
> xmlrpclib.Server('http://{username}:{password}@{hostname}/RPC2')
> person = server.person.getById("10100");
> print(person["url"])
> person["url"] = ""
> person = server.person.update(person)
> print(person["url"]

I've made some notes about this in the docs plone.

On the page -
http://www.opengroupware.org/en/devs/resources/xmlrpc/index.html - is
the text:
"To call OGo XML-RPC functions you need a XML-RPC client which is able
to perform HTTP basic-authentication. The xmlrpc module included with
Python does not include this facility (the error printed with the
"wrong" library looks like: TypeError: __init__() got an unexpected
keyword argument 'login').
We provide a patched module that can handle HTTP basic-authentication.
Get the module here."

It would be good I think to replace this with a note about how to use
the current Python XML-RPC stuff.  The patched module doesn't really
work anymore either.

Also, could the "C# / Mono" section be changed to point to
http://docs.opengroupware.org/Members/whitemice/OGoMojo/ ?
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBEYerpLRePpNle04MRAsa4AJ4qomrIluOqdav8UEsSBJvKCauXNACfagK5
yWh2S75DR1FpWWmoJc8xUX0=
=0slp
-----END PGP SIGNATURE-----