Is this a true statement?
Grant Edwards
grante at visi.com
Sun Jun 24 20:37:30 EDT 2001
On 23 Jun 2001 18:42:20 GMT, David LeBlanc <whisper at oz.nospamnet> wrote:
>The reason why you can't write a device driver in pure Python
>is simple: a device driver requires the ability to read to and
>write from specific pre-determined locations in the processor's
>memory and/or I/O space.
So you write a few trivial extension modules in C to handle
direct access of physical memory and I/O. That shouldn't take
more than an hour or two.
The real work is getting a Python byte-code interpreter running
in kernel-mode.
>It would be possible, if best performance where not required, to extend
>Python with C or ASM (and possibly C++, but not without some dificulty:
>passing "this"pointers gets in the way when crossing memory management
>and/or procsss thresholds.
The same problems happen when passing C pointers around.
>Of course, with enough glue and the right scaffold, one could glue up
>enough toothpicks to reach the moon.
I don't think it would be quite that hard. :)
--
Grant Edwards grante Yow! I just got my PRINCE
at bumper sticker... But now I
visi.com can't remember WHO he is...
More information about the Python-list
mailing list