Note
This documentation is for a development version of IPython. There may be significant differences from the latest stable release (1.2.1).
Compiler tools with improved interactive support.
Provides compilation machinery similar to codeop, but with caching support so we can provide interactive tracebacks.
Bases: codeop.Compile
A compiler that caches code compiled from interactive statements.
Parse code to an AST with the current compiler flags active.
Arguments are exactly the same as ast.parse (in the standard library), and are passed to the built-in compile function.
Make a name for a block of code, and cache the code.
Parameters: | code : str
number : int
|
---|---|
Returns: | The name of the cached code (as a string). Pass this as the filename argument to compilation, so that tracebacks are correctly hooked up. |
Flags currently active in the compilation process.
Reset compiler flags to default state.