Is this a true statement?

David C. Ullrich ullrich at
Sun Jun 24 18:23:51 CEST 2001

On Sun, 24 Jun 2001 08:28:25 -0700, "Emile van Sebille"
<emile at> wrote:

>"David C. Ullrich" <ullrich at> wrote in message
>news:3b35ebc3.1024709 at
>> On Sat, 23 Jun 2001 09:36:13 -0500, "Chris Gonnerman"
>> <chris.gonnerman at> wrote:
>> Seriously. _Is_ a "device driver" something other than a file?
>> If it _is_ something other than a file I wish someone would
>> say so. If a device driver is just a file then I don't see
>> how the OS can possibly know or care how that file was
>> generated.
>Of course not.  And of course a file can be written by python that the os
>can subsequently use as a device driver.  To do so, you will have written
>both a compile-to-bytes program and a device-driver-source file intended to
>be consumed by the compiler piece. 

That's what I thought. Seems clear. Makes it hard to see how the
statement "you cannot write a device driver in Python" can
be correct. 

> When this result is invoked by the os,
>it will not be a python program running within the interpreter.

And if you write a device driver in C then when that driver
is invoked by the OS it _is_ a C program being interpreted by
the compiler? Or is it machine code being interpreted by the OS?
(The second, of course. So what's the difference between Python
and C in this regard?)

Whether anyone belives it or not, I _did_ have actual questions
at the start of this. It was said that you cannot write a device
driver in Python because Python cannot access hardware interrupts
(or whatever). I don't see how a program _writing_ a device
driver needs to do that, so I don't see what it has to do with
whether you can write a device driver in Python.

>Generally speaking, writing a device driver is not thought of as similar to
>copying a driver file from floppy, then saying that even something as simple
>as cp or copy can be used to "write" a device driver.

But to write that device driver in Python or any other
language you don't need to have a copy of the driver, you
just need a clear specification of exactly what the driver
is supposed to do, plus a specification of what machine
code is required to get the OS to do a certain thing.

>Emile van Sebille
>emile at

David C. Ullrich
"Sometimes you can have access violations all the 
time and the program still works." (Michael Caracena, 
comp.lang.pascal.delphi.misc 5/1/01)

More information about the Python-list mailing list