Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(1)  |  Derive(0)  |  Import(2)
Pretty-print an AST to the given output stream.

        def printAst(astmod, ast, indent='  ', stream=sys.stdout, initlevel=0):
    "Pretty-print an AST to the given output stream."
    rec_node(astmod, ast, initlevel, indent, stream.write)

src/p/y/pyjs-HEAD/pgen/lib2to3/compiler/transformer.py   pyjs(Download)
from astpprint import printAst
from pprint import pprint
            if len_nodelist != 2 and isinstance(result, GenExpr) \
               and len(node.children) == 3 and node.children[2].type == symbol.gen_for:
                # allow f(x for x in y), but reject f(x for x in y, 1)
                # should use f((x for x in y), 1) instead of f(x for x in y, 1)

src/p/y/pyjs-HEAD/pgen/test_parse.py   pyjs(Download)
test_std = True
from astpprint import getAststr, printAst
if test_pyjs: