[OGo-XML-RPC] Pyhton 2.4

Adam Tauno Williams xmlrpc@opengroupware.org
Wed, 10 May 2006 09:30:17 -0400


--=-VzDX7kOJugnGAzAnn+y+
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

> > > server =3D 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 =20
> > should not be strings.
> > If I understand it right it should be just:
> >    s =3D xmlrpclib.Server("http://user:passwd@localhost/RPC2")
> > This works for me (Debian Python 2.3).
> Yep, this works -=20
> #!/usr/bin/env python
> import xmlrpclib
> server =3D
> xmlrpclib.Server('http://{username}:{password}@{hostname}/RPC2')
> person =3D server.person.getById("10100");
> print(person["url"])
> person["url"] =3D ""
> person =3D 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/ ?

--=-VzDX7kOJugnGAzAnn+y+
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

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

--=-VzDX7kOJugnGAzAnn+y+--