comparison tests/rpctest.py @ 0:77665d8e2254

tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0 (automatically generated log message) imported from: moin--main--1.5--base-0
author Thomas Waldmann <tw-public@gmx.de>
date Thu, 22 Sep 2005 15:09:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:77665d8e2254
1 # -*- coding: iso-8859-1 -*-
2 import xmlrpclib
3
4 if __name__ == "__main__":
5
6 server = xmlrpclib.ServerProxy('http://127.0.0.1/cgi-bin/wiki.bat/?action=xmlrpc')
7 print server
8
9 try:
10 frontpage = server.getPage('FrontPage').data.decode('UTF-8')
11 print "Length of FrontPage:", len(frontpage)
12 print "Start of FrontPage:", repr(frontpage[:50]), "..."
13 print "End of FrontPage:", "...", repr(frontpage[-50:])
14 print "Interface Version:", server.getRPCVersionSupported()
15 print "Number of Pages:", len(server.getAllPages())
16 except xmlrpclib.Error, v:
17 print "ERROR", v
18