About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

linux default iconsourcecodegen Publisher's description

A Python source-code generator based on the "compiler.ast" abstract syntax tree.

sourcecodegen is a Python library that provides a module-level source-code generator which operates on the AST from the built-in compiler.ast module.

Note that this AST is not compatible with the new ast module in Python 2.6.


The generator works on AST parse trees.

>>> from compiler import parse
>>> tree = parse("""
... print 'Hello, world!'
... """)

We can now generate Python-code equivalent to the original using the source-code generator.

>>> from sourcecodegen import ModuleSourceCodeGenerator
>>> generator = ModuleSourceCodeGenerator(tree)
>>> print generator.getSourceCode()
print 'Hello, world!'

What's New in This Release:

В· Added support for ternary operator (Python 2.5+). [malthe]

System Requirements:

В· Python
Program Release Status:
Program Install Support: Install and Uninstall

sourcecodegen Tags:

Click on a tag to find related softwares

Is sourcecodegen your software?

Manage your software

Most Popular

linux default icon GDB 7.4
GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it... Read more
linux default icon Coral 0.9.1
Coral is a tool and a development platform to create and transform models and modeling languages.
linux default icon Forum Paid Plus Script 6.1
Forum Paid Pay Per Post Exchange is targeted at forum owners who wish to...
linux default icon sdo 0.6.5
Converts oracle SDO_GEOMETRY objects to WKT and GeoJSON.
linux default icon Get Paid Plus Script 6.1
Get Paid Plus Script

Related Category

» Other (877)
» Tools & Editors (359)
» Web Development (146)