Python for drivers?

jepler epler jepler.lnk at lnk.ispi.net
Sat Apr 22 22:31:23 EDT 2000


On Sat, 22 Apr 2000 01:10:04 GMT, Dave
 <redsand at dsuper.net> wrote:
>Can Python be used for writing device drivers? I just got BeOS 5 and it
>doesn't support some video cards. I'd like to write one for the Cirrus
>Logic card and I want a language that's clear and concise- Python. I've
>never written device drivers. Any suggestions?
>THanks

If you can use a tool like SWIG (or a hand written C module) to provide
access to the necessary low-level features, you may be able to do this.

For instance, if the card needs the idea of 'store {8,16,32}-bit integer X at
index L of the video card's address space' and 'read {8,16,32}-bit
integer at index L of the video card's address space', then you'd just
need to write those following functions in a C module for Python to call.

It may be slow, as other posters suggest.

Jeff



More information about the Python-list mailing list