Python XMLRPC 48 4 XMLRPC import calendar Simple

  • Slides: 8
Download presentation

Python XML-RPCサーバー <4/8> リスト4: XML-RPCカレンダー・サーバー import calendar, Simple. XMLRPCServer #The server object class Calendar:

Python XML-RPCサーバー <4/8> リスト4: XML-RPCカレンダー・サーバー import calendar, Simple. XMLRPCServer #The server object class Calendar: def get. Month(self, year, month): return calendar. month(year, month) def get. Year(self, year): return calendar(year) calendar_object = Calendar() server = Simple. XMLRPCServer(("localhost", 8888)) server. register_instance(calendar_object) #Go into the main listener loop print "Listening on port 8888" server. serve_forever() 【特別セッション】 身近な生活のリズムを記録するシステム(Life Style Logger)と、Pythonの分散プログラミングモジュール(xmlrpc) p. 3