Pythonでxmlrpc その2

昨日の続き。
ServerProxyにuse_datetime=Trueを渡せばdatetime.datetimeで日付を返してくれるようだ

# coding=utf-8
import xmlrpclib
import datetime

proxy = xmlrpclib.ServerProxy("http://localhost:8000/", use_datetime=True)
today = proxy.today()

print today.__class__
print "Today: %s" % converted.strftime("%d.%m.%Y, %H:%M")
<type 'datetime.datetime'>
Today: 04.03.2013, 21:39