1
2 Python binding to FUSD
3
4 Brian Warner
5 warner-fusd@lothar.com
6 16 Jun 2003
7
8
9 This is a python binding to the FUSD library, allowing you to write
10 user-space device drivers in Python.
11
12 To build the binding, step into this python/ directory and use setup:
13
14 ./setup.py build
15
16 This will compile the necessary shared object and copy the .py file into the
17 build/ directory. To install this into /usr/local, use setup again:
18
19 ./setup.py install
20
21 Other target directories are a possibility: look at the documentation for
22 python's "distutils" module for details, or do ./setup.py --help
23
24
25 This binding uses a Device object to represent the overall device (which
26 responds to open() and close() methods), and an OpenFile object to hold each
27 open file pointer for that device (and responds to read/write/ioctl
28 methods). Some examples are provided in fusd.py, and some helper scripts are
29 in the test/ directory.
30
31 To start a /dev/python device that behaves very much like /dev/zero, just
32 run this short python program:
33
34 #! /usr/bin/python
35 import fusd
36 d = fusd.SampleDevice("python", 0666)
37 d.openFileClass = fusd.ZeroFile
38 fusd.run()
39
40
41 Please send any questions, patches, or bug reports to me at
42 <warner-fusd@lothar.com>.
43
44 And thanks to Jeremy for the great package!
45
46 -Brian
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.