annotate MoinMoin/script/xmlrpc/retrieve.py @ 2939:6259bb49366c

trivial xmlrpc examples (scripts)
author Johannes Berg <johannes AT sipsolutions DOT net>
date Fri, 02 Nov 2007 12:43:42 +0000
parents
children 2572688e031a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2939
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
1 # -*- coding: iso-8859-1 -*-
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
2 """
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
3 MoinMoin - page contents retriever
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
4
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
5 @copyright: 2007 MoinMoin:JohannesBerg
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
6 @license: GNU GPL, see COPYING for details.
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
7 """
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
8
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
9 import xmlrpclib
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
10
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
11 from MoinMoin.script import MoinScript
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
12
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
13 class PluginScript(MoinScript):
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
14 def __init__(self, argv, def_values):
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
15 MoinScript.__init__(self, argv, def_values)
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
16 self.argv = argv
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
17
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
18 def mainloop(self):
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
19 s = xmlrpclib.ServerProxy(self.argv[0])
6259bb49366c trivial xmlrpc examples (scripts)
Johannes Berg <johannes AT sipsolutions DOT net>
parents:
diff changeset
20 print s.getPage(self.argv[1])