diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/script/xmlrpc/retrieve.py	Fri Nov 02 12:43:42 2007 +0000
@@ -0,0 +1,20 @@
+# -*- coding: iso-8859-1 -*-
+"""
+    MoinMoin - page contents retriever
+
+    @copyright: 2007 MoinMoin:JohannesBerg
+    @license: GNU GPL, see COPYING for details.
+"""
+
+import xmlrpclib
+
+from MoinMoin.script import MoinScript
+
+class PluginScript(MoinScript):
+    def __init__(self, argv, def_values):
+        MoinScript.__init__(self, argv, def_values)
+        self.argv = argv
+
+    def mainloop(self):
+        s = xmlrpclib.ServerProxy(self.argv[0])
+        print s.getPage(self.argv[1])