A pure python implementation of the wily rpc client.

It's alpha quality at best. Not all code paths have been executed, and since it's python there could be a variable name typo or something lurking about. It does the things I have needed it to do, and bugs will be fixed as I come across them or as they are reported to me.

Hopefully, the python code isn't too unreadable, since the documentation is sparse.

The tarball contains some examples in pywily/example directory.

Anyway the bits you might care about are:

The docstring for the wily module says:

A reasonably easy to use interface to wily.

The wily connection is created and managed via the Connection class, and wily windows are created and managed via the Win class. For example, the simple 'wedit' command, which opens file for editing in wily and exits when the window is delted would be:

    import wily
    import sys
    import os
    
    cwd = os.getcwd()
    path= os.path.join(cwd, sys.argv[1])
    con = wily.Connection()
    win = con.win(path,1)
    win.set_cb(wily.WEdestroy, lambda msg: sys.exit())
    win.attach(wily.WEdestroy)
    con.event_loop()  

I've reimplemented win.c from the standard wily tools in python using the module (mainly as a way of testing things), the code is ugly and uncommented, and translated from C (making it not very "pythonic"). It is, however, a largish (at 200 lines - one quarter of which is a large initial docstring) example of using the module for something non-trivial. You can view it without downloading the entire tarball.