|
|
Jump to this file's LXR Page |
|
|
File: [CENS] / emstar / fusd / python / README
(download)
Revision: 1.1, Thu Jun 19 19:09:09 2003 UTC (6 years, 5 months ago) by jelson Branch: MAIN CVS Tags: scale_radio_channel, rdd_alpha_version_1, pregeonet, nims-lab-Sep07-2004, nims-jr-Sep05-04, mote, lessgps_release, kiss_release, fusd_with_no_daemon, fusd-1_10, copyright-07-11-03, bp_scale_radio_channel, audio_server, acoustic-05-18-06, ROUTING_EXPERIMENTAL, PRE_TOSNIC_FIX, PRE_NOMEGA_MOTENIC, PRE_MOTENIC_CLEANUP, PRE_CEILING_FIX, PRE_64BIT, MOTENIC_PRE_BUGFIX_20050415, LESSGPS_1_00, LAURA_CALIBRATION_EXPERIMENTS, KISS_1_0, HOSTMOTE_V_6_EXPERIMENTAL, HOSTMOTE_PROTOCOL_VERSION_7, HOSTMOTE_PROTOCOL_VERSION_6_WITH_HOSTMOAP, HOSTMOTE_PROTOCOL_VERSION_5_WITH_HOSTMOAP, HOSTMOTE_PROTOCOL_VERSION_5, HOSTMOTE_PROTOCOL_VERSION_4, HOSTMOTE_PROTOCOL_VERSION_3, HEAD, ESS_RELEASE_3_5, ESS_RELEASE_3_4, ESS_RELEASE_3_3, ESS_RELEASE_3_2, ESS_RELEASE_3_1, ESS_RELEASE_3_0, ESS_RELEASE_2_0, ESS_CONNECTIVITY, ESS_CENTROUTE_TESTING, ESS2-CMS-V1_5_pretest, ESS2-CMS-V1_4cMergeSympathy_2, ESS2-CMS-V1_4c, ESS2-CMS-V1_4b, ESS2-CMS-V1_4a, ESS2-CMS-V1_3, ESS2-CMS-V1_2, ESS2-CMS-V1_1, ESS2-CMS-V1_0, EMSTAR_RELEASE_2_5, EMSTAR_RELEASE_2_1_BRANCH, EMSTAR_RELEASE_2_1, EMSTAR_RELEASE_2_0_beta1, EMSTAR_RELEASE_2_0, EMSTAR_RELEASE_1_3_2, EMSTAR_RELEASE_1_3_1, EMSTAR_RELEASE_1_3, EMSTAR_RELEASE_1_2, EMSTAR_RELEASE_1_1, EMSTAR_RELEASE_1_0, EMSTAR_PRE_HTML, CYCLOPS_RELEASE_CANDIDATE_2_0, CYCLOPS_PRERELEASE_STABLE, CENTROUTE_EMSTAR_SOCKETS, BG_1_0, BANGLADESH_ARSENIC_1_2, BANGLADESH_ARSENIC_1_1, AMARSS_JR_DEPLOYMENT_6_05_07 Added first version of FUSD Python bindings from Brian Warner |
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
| CENS CVS Mailing List |
Powered by ViewCVS 0.9.2 |