how to get the last interactive command enetered

Tom NoSpam at NoSpam.com
Sun Mar 4 12:33:13 EST 2001


"Martin von Loewis" <loewis at informatik.hu-berlin.de> wrote in message
news:j4zof17qp3.fsf at informatik.hu-berlin.de...
> "Tom" <NoSpam at NoSpam.com> writes:
>
> > > No. Once the code is executed, the source code is dropped. All you can
> > > get at is the binary code.
> >
> > But when I catch a 'call' trace event the code has not been executed.  I
> > believe that it has been parsed and compiled but not executed (till I
get
> > the 'return' trace event).
>
> Yes, it has been parsed and compiled, the result of which was a code
> object (which in turn was put into a function object). After that, the
> source code, and the abstract syntax tree, is discarded (actually the
> source code is discarded in the process of parsing).
>
> The code object has a file name in it and line numbers, that's all
> that's left from the source.

I was afraid of that.

Thanks,

Tom.

> Regards,
> Martin





More information about the Python-list mailing list