Choisissez la catégorie, puis la rubrique :

18.24.8 Convenience Functions

18.24.8 Convenience Functions

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

dumps( params[, methodname[, methodresponse[, encoding[, allow_none]]]])
Convert params into an XML-RPC request. or into a response if methodresponse is true. params can be either a tuple of arguments or an instance of the Fault exception class. If methodresponse is true, only a single value can be returned, meaning that params must be of length 1. encoding, if supplied, is the encoding to use in the generated XML; the default is UTF-8. Python's None value cannot be used in standard XML-RPC; to allow using it via an extension, provide a true value for allow_none.

loads( data[, use_datetime])
Convert an XML-RPC request or response into Python objects, a (params, methodname). params is a tuple of argument; methodname is a string, or None if no method name is present in the packet. If the XML-RPC packet represents a fault condition, this function will raise a Fault exception. The use_datetime flag can be used to cause date/time values to be presented as datetime.datetime objects; this is false by default. Note that even if you call an XML-RPC method with or datetime.time objects, they are converted to DateTime objects internally, so only datetime.datetime objects will be returned.

Changed in version 2.5: The use_datetime flag was added.

See About this document... for information on suggesting changes.
Contacter le responsable de la rubrique Python