
Python binding to FUSD

 Brian Warner
 warner-fusd@lothar.com
 16 Jun 2003


This is a python binding to the FUSD library, allowing you to write
user-space device drivers in Python.

To build the binding, step into this python/ directory and use setup:

 ./setup.py build

This will compile the necessary shared object and copy the .py file into the
build/ directory. To install this into /usr/local, use setup again:

 ./setup.py install

Other target directories are a possibility: look at the documentation for
python's "distutils" module for details, or do ./setup.py --help


This binding uses a Device object to represent the overall device (which
responds to open() and close() methods), and an OpenFile object to hold each
open file pointer for that device (and responds to read/write/ioctl
methods). Some examples are provided in fusd.py, and some helper scripts are
in the test/ directory.

To start a /dev/python device that behaves very much like /dev/zero, just
run this short python program:

 #! /usr/bin/python
 import fusd
 d = fusd.SampleDevice("python", 0666)
 d.openFileClass = fusd.ZeroFile
 fusd.run()


Please send any questions, patches, or bug reports to me at
<warner-fusd@lothar.com>.

And thanks to Jeremy for the great package!

 -Brian
