code

Utilities needed to emulate Python’s interactive interpreter.

Functions

compile_command(source[, filename, symbol]) Compile a command and determine whether it is incomplete.
interact([banner, readfunc, local]) Closely emulate the interactive Python interpreter.
softspace(file, newvalue)

Classes

CommandCompiler() Instances of this class have __call__ methods identical in signature to compile_command; the difference is that if the instance compiles program text containing a __future__ statement, the instance ‘remembers’ and compiles all subsequent program texts with the statement in force.
InteractiveConsole([locals, filename]) Closely emulate the behavior of the interactive Python interpreter.
InteractiveInterpreter([locals]) Base class for InteractiveConsole.