Movatterモバイル変換


[0]ホーム

URL:


Up one LevelPython Library ReferenceContentsModule IndexIndex

18.24.8 Convenience Functions

boolean(value)
Convert any Python value to one of the XML-RPC Boolean constants,True orFalse.

dumps(params[, methodname[, methodresponse[, encoding[, allow_none]]]])
Convertparams into an XML-RPC request.or into a response ifmethodresponse is true.params can be either a tuple of arguments or an instance of theFault exception class. Ifmethodresponse is true,only a single value can be returned, meaning thatparams must be of length 1.encoding, if supplied, is the encoding to use in the generatedXML; the default is UTF-8. Python'sNone value cannot beused in standard XML-RPC; to allow using it via an extension, provide a true value forallow_none.

loads(data[, use_datetime])
Convert an XML-RPC request or response into Python objects, a(params,methodname).params is a tuple of argument;methodnameis a string, orNone if no method name is present in the packet.If the XML-RPC packet represents a fault condition, thisfunction will raise aFault exception.Theuse_datetime flag can be used to cause date/time values to bepresented asdatetime.datetime objects; this is falseby default.Note that even if you call an XML-RPC method withdatetime.date ordatetime.timeobjects, they are converted toDateTime objects internally, so onlydatetime.datetime objects will be returned.

Changed in version 2.5:Theuse_datetime flag was added.


Up one LevelPython Library ReferenceContentsModule IndexIndex

Release 2.5.2, documentation updated on 21st February, 2008.
SeeAbout this document... for information on suggesting changes.
[8]ページ先頭

©2009-2025 Movatter.jp