API Reference for Enthought Tool Suite 3.2.0

Turn compiler.ast structures back into executable python code.

The unparse method takes a compiler.ast tree and transforms it back into valid python code. It is incomplete and currently only works for import statements, function calls, function definitions, assignments, and basic expressions.

Inspired by python-2.5-svn/Demo/parser/unparse.py

fixme: We may want to move to using _ast trees because the compiler for
them is about 6 times faster than compiler.compile.

Variables

Classes

Function summary

Functions

Imported Names

Local nameRefers to
Addcompiler.ast.Add
Constcompiler.ast.Const
cStringIOcStringIO
Divcompiler.ast.Div
Mulcompiler.ast.Mul
Namecompiler.ast.Name
Subcompiler.ast.Sub
syssys
Tuplecompiler.ast.Tuple

© Copyright 2002-2009 Enthought, Inc.