Bengt Richter wrote:
On Sun, 09 Oct 2005 12:10:46 GMT, Ron Adam [EMAIL PROTECTED] wrote:
Ron Adam wrote:
It seems I've found a bug in dis.py, or maybe a expected non feature.
When running dis from a program it fails to find the last traceback
because sys.last_traceback doesn't get set. (a
[EMAIL PROTECTED] wrote:
I'm still looking for info on how to use disassemble_string().
How about this?
import dis
def f():
... print hello world
...
f.func_code.co_code
'd\x01\x00GHd\x00\x00S'
dis.disassemble_string(f.func_code.co_code)
On Sun, 09 Oct 2005 12:10:46 GMT, Ron Adam [EMAIL PROTECTED] wrote:
Ron Adam wrote:
Can anyone show me an example of of using dis() with a traceback?
Examples of using disassemble_string() and distb() separately if
possible would be nice also.
[cliped]
But I still need to rewrite
I'm still looking for info on how to use disassemble_string().
How about this?
import dis
def f():
... print hello world
...
f.func_code.co_code
'd\x01\x00GHd\x00\x00S'
dis.disassemble_string(f.func_code.co_code)
0 LOAD_CONST 1 (1)
Ron Adam wrote:
Can anyone show me an example of of using dis() with a traceback?
Examples of using disassemble_string() and distb() separately if
possible would be nice also.
[cliped]
But I still need to rewrite disassemble_string() and need to test it
with tracebacks.
Cheers,
Can anyone show me an example of of using dis() with a traceback?
Examples of using disassemble_string() and distb() separately if
possible would be nice also.
I'm experimenting with modifying the dis module so that it returns it's
results instead of using 'print' it as it goes. I want to