Does python have the capability for driver development ?

Martin P. Hellwig martin.hellwig at
Thu Jul 30 01:05:04 CEST 2009

MalC0de wrote:
> hello there, I've a question :
> I want to know does python have any capability for using Ring0 and
> kernel functions for driver and device development stuff .
> if there's such a feature it is very good, and if there something for
> this kind that you know please refer me to some reference and show me
> some snippet .
> thanks
> - Malc0de

Python is interpreted, so the first requirement would be that the 
interpreter (the python VM to be more precise) would run in the kernel 
or that there is a way for the interpreter to delegate operations to 
kernel restricted operations. Most notably access to the memory location 
of the hardware you want to write a driver for and possibly also a way 
to pass through a callback function for triggered  interrupt coming from 
the hardware.

So technically speaking it shouldn't be impossible. And there is perhaps 
something to say for being able to write drivers in a readable/easy 
programming language however I am afraid that if such a beast would be 
made that it would remain an academical exercise only due to performance 

Though I would love to play around with a system where the kernel is 
essentially only a python interpreter, with full raw access to the hardware.

But creating such a thing requires more talent and understanding than 
currently (and probably ever) in my possession.

'If consumed, best digested with added seasoning to own preference.'

More information about the Python-list mailing list