Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Pyhton 2.4: msg#00012

cms.opengroupware.xmlrpc.devel

Subject: Re: Pyhton 2.4

On Wed, 2006-05-10 at 14:28 +0200, Helge Hess wrote:
> 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.

I think so.

> > 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"]

--- producing the output ---
awilliam@aleph:~> ./test.py
http://www.whitemice.org
http://www.whitemice.org
-- which is a test case of Bug#1723

Attachment: signature.asc
Description: This is a digitally signed message part

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.postgresql.b...    video.ffmpeg.us...    gis.qgis.devel/...    web.rdf.redland...    file-systems.oc...    recreation.rail...    systems.archos....    python.c++/2003...    lang.c--/2005-0...    multimedia.gpho...    network.unison....    editors.jedit.u...    hardware.pciids...    cms.tiki.cvs/20...    bug-tracking.ma...    java.hadoop.hba...    ietf.rsvp/2002-...    xfree86.devel/2...    qnx.openqnx.dev...    apache.labs.dev...    tex.pdftex/2008...    os.solaris.open...    user-groups.lin...    kde.koffice/200...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation