Does python have the capability for driver development ?

Dave Angel davea at ieee.org
Thu Jul 30 09:20:45 EDT 2009


Martin P. Hellwig wrote:
> <div class="moz-text-flowed" style="font-family: -moz-fixed">Michel 
> Claveau - MVP wrote:
>> Hi!
>>
>>> Python is interpreted
>>
>> No. Python is compiled (--> .pyc)
>> But the term "to compile" is not always unambiguous...
>> And the notion of "compiler" is not attached to Python (the 
>> language), but is attached to the implementation.
>>
>> @+
>>
>> MCI
>
> Well the pyc, which I thought was the Python bytecode, is then 
> interpreted by the VM.
>
As Michel says, "to compile" is not always unambiguous.  My definition 
includes a one-way transformation from human-readable source text into 
something that can be more efficiently interpreted by other code, or by 
hardware.  The compiler really doesn't care whether the machine it's 
targeting is real or virtual.

The CPython implementation of Python compiles the source text into a 
bytecode file, with extension .pyc.    That certainly is a compilation 
step.  Followed (much) later by an interpreted one.

To pick a specific implementation of C++,  Microsoft C++ compiles C++ 
source text into an "executable file,"  with extension .exe  (I'm 
ignoring little details, like the linker).  That's a compilation step.  
Then the exe file is (later) interpreted by the microcode on the Pentium 
chip.

As far as I know, nobody has yet built a microcode implementation of a 
Python VM (Virtual Machine).  Nor have I seen one for the Java VM.  
However, in the early 80's there was a microcode implementation of the 
P-system VM.  It was never a commercial success, but it existed.  And 
there have been at least three Forth machines, where the hardware itself 
was designed to support the language's VM.  No microcode at all.

DaveA



More information about the Python-list mailing list