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

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 s

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

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 ne

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