translating Python to Assembler

Grant Edwards grante at visi.com
Sat Jan 26 00:02:43 EST 2008


On 2008-01-26, over at thepond.com <over at thepond.com> wrote:

> Once a python py file is compiled into a pyc file, I can disassemble
> it into assembler.

No you can't.  It's not native machine code.  It's byte code
for a virtual machine.

> 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.

NO YOU CAN'T.

> It doesn't make a lot of sense to me right now,

That's because IT'S NOT MACHINE CODE.

> but if I was trying to trace through it with a debugger,

That wouldn't work.

> the debugger would disassemble it into assembler,
> not python.

You can "disassemble" random bitstreams into assembler.  That
doesn't make it a useful thing to do.

[Honestly, I think you're just trolling.]


-- 
Grant Edwards                   grante             Yow!  Yow! Is this sexual
                                  at               intercourse yet?? Is it,
                               visi.com            huh, is it??



More information about the Python-list mailing list