how to get the last interactive command enetered

Tom NoSpam at NoSpam.com
Fri Mar 2 15:05:57 EST 2001


Assuming that python is in interactive mode, how do get the text of the
command that the user has just entered?

For example, say that I set a trace function.  I find the frame's code
object, look at co_filename and find that it is <stdin>.  But I want to know
what the actual command was.  Is there anyway to do this (in C or Python)?

Thanks,
Tom.








More information about the Python-list mailing list