InteractiveConsole.push(line) Push a line of source text to the interpreter. The line should not have a trailing newline; it
code.compile_command(source, filename="", symbol="single") This function is useful for programs that want to emulate Python’s
InteractiveInterpreter.runcode(code) Execute a code object. When an exception occurs, showtraceback() is called
InteractiveInterpreter.showtraceback() Display the exception that just occurred. We remove the first stack item because it is
class code.InteractiveInterpreter(locals=None) This class deals with parsing and interpreter state (the user’s namespace); it
InteractiveInterpreter.write(data) Write a string to the standard error stream (sys.stderr). Derived classes should
InteractiveConsole.raw_input(prompt="") Write a prompt and read a line. The returned line does not include the trailing newline
codeop.compile_command(source, filename="", symbol="single") Tries to compile source, which should be a string of Python
InteractiveConsole.resetbuffer() Remove any unhandled source text from the input buffer.
InteractiveInterpreter.runsource(source, filename="", symbol="single") Compile and run some source in the interpreter. Arguments
Page 1 of 2