translating Python to Assembler

over at thepond.com over at thepond.com
Sun Jan 27 03:55:15 EST 2008


On Fri, 25 Jan 2008 17:36:06 -0800 (PST), ajaksu <ajaksu at gmail.com>
wrote:

>On Jan 25, 11:10 pm, o... at thepond.com wrote:
>> Once a python py file is compiled into a pyc file, I can disassemble
>> it into assembler. Assembler is nothing but codes, which are
>> combinations of 1's and 0's. You can't read a pyc file in a hex
>> editor, but you can read it in a disassembler. It doesn't make a lot
>> of sense to me right now, but if I was trying to trace through it with
>> a debugger, the debugger would disassemble it into assembler, not
>> python.
>
>


>Please, tell me you're kidding...

hehe...which part am I kidding about? The explanation was for someone
who thought python scripts were translated directly by the processor.
I had no idea how much he knew, so I kept it basic (no pun intended). 

Or...do you disagree with what I'm saying? You didn't say much. I have
already disassembled a pyc file as a binary file. Maybe I was using
the term assembler too broadly. A binary compiled from an assembler
source would look similar in parts to what I disassembled. 

That's not the point, however. I'm trying to say that a processor
cannot read a Python script, and since the Python interpreter as
stored on disk is essentially an assembler file, any Python script
must be sooner or later be converted to assembler form in order to be
read by its own interpreter. Whatever is typed in a Python script must
be converted to binary code.




More information about the Python-list mailing list