view MoinMoin/script/old/xmlrpc-tools/ @ 3115:cd6cfc715261

replace by, replace contact Juergen Hermann by Thomas Waldmann, cleanup wikiconfig (ported from 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 25 Feb 2008 23:53:55 +0100
parents ef41e35985dc
line wrap: on
line source

#!/usr/bin/env python
This script checks whether the wiki authenticates and trusts you.

It calls the xmlrpc plugin. To use http auth, you need to configure
the srcwiki with auth = [http, moin_cookie] in its wikiconfig.

GPL software, 2005 Thomas Waldmann

def run():
    user = "ThomasWaldmann"
    password = "wrong"

    import sys, xmlrpclib
    sys.path.insert(0, '../../..')
    from import BasicAuthTransport

    srctrans = BasicAuthTransport(user, password)
    srcwiki = xmlrpclib.ServerProxy("", transport=srctrans)

    print srcwiki.WhoAmI()

if __name__ == "__main__":