Re: dis.dis question

2005-10-16 Thread Ron Adam
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

Re: dis.dis question

2005-10-16 Thread Ron Adam
[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)

Re: dis.dis question

2005-10-15 Thread Bengt Richter
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

Re: dis.dis question

2005-10-15 Thread skip
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)

Re: dis.dis question

2005-10-09 Thread Ron Adam
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,

dis.dis question

2005-10-08 Thread Ron Adam
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