On 05/28/2013 07:02 AM, Jim Mooney wrote:
On 27 May 2013 16:20, Alan Gauld <alan.ga...@btinternet.com> wrote:


To me, the bytecodes are the literal hex values corresponding
to the Python "assembler" statements. Are you sure you need the bytecodes?
You can use the standard library to generate the
assembler listing from the Python code.

Ah good, how do I do that? What's the module? Thanks.


Alan and Devin already gave more specifics, but to repeat,

import dis

dis.dis(myfunction)

will disassemble one function.

That's not all that's in the byte-code file, but this is 98% of what you probably want out of it. And you can do it in the debugger with just the standard library.


--
DaveA
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to