Python for drivers?

Moshe Zadka moshez at math.huji.ac.il
Sun Apr 23 01:09:17 EDT 2000


On Sun, 23 Apr 2000, jepler epler wrote:

> 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.

Um...unless you're talking about something like Hurd-like userspace
drivers, it'd still be pretty close to impossible. In general, you avoid
memory allocation and deallocation inside the kernel like the flu,
especially few-bytes allocation. On the other hand, the Python interpreter
usually allocates and dellocates like crazy. This would probably kill
a Linux kernel.

--
Moshe Zadka <mzadka at geocities.com>. 
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com





More information about the Python-list mailing list