view tests/rpctest.py @ 212:8af4c008e5b9 1.5.0beta3

1.5.0beta3 release, bumped version, do not offer gui editor for safari imported from: moin--main--1.5--patch-214
author Thomas Waldmann <tw@waldmann-edv.de>
date Sun, 13 Nov 2005 13:26:52 +0000
parents 77665d8e2254
children
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
import xmlrpclib

if __name__ == "__main__":

    server = xmlrpclib.ServerProxy('http://127.0.0.1/cgi-bin/wiki.bat/?action=xmlrpc')
    print server

    try:
        frontpage = server.getPage('FrontPage').data.decode('UTF-8')
        print "Length of FrontPage:", len(frontpage)
        print "Start of FrontPage:", repr(frontpage[:50]), "..."
        print "End of FrontPage:", "...", repr(frontpage[-50:])
        print "Interface Version:", server.getRPCVersionSupported()
        print "Number of Pages:", len(server.getAllPages())
    except xmlrpclib.Error, v:
        print "ERROR", v