Did I find the right examples for you? yes no

All Samples(18)  |  Call(4)  |  Derive(7)  |  Import(7)
Utility object for transforming Python parse trees.

Exposes the following methods:
    tree = transform(ast_tree)
    tree = parsesuite(text)
    tree = parseexpr(text)
    tree = parsefile(fileob | filename)

src/b/l/blockcanvas-HEAD/blockcanvas/numerical_modeling/workflow/block_experiment_networkx/compiler_/compiler_.py   blockcanvas(Download)
from compiler import pycodegen
from compiler.ast import Expression, Module
from compiler.transformer import Transformer
from copy import copy
import sys
def parse(buf, mode="exec", transformer=None):
    'Extends compiler.parse to take a transformer.'
    if transformer is None:
        transformer = Transformer()
    if mode == "exec" or mode == "single":

src/b/l/blockcanvas-HEAD/blockcanvas/numerical_modeling/workflow/block_experiment_networkx/parser_.py   blockcanvas(Download)
from compiler.ast import Module
from compiler.transformer import Transformer
import token
 
class BlockTransformer(Transformer, object):

src/c/o/codetools-4.2.0/codetools/blocks/compiler_/compiler_.py   codetools(Download)
from compiler import pycodegen
from compiler.ast import Expression, Module
from compiler.transformer import Transformer
from copy import copy
import sys
def parse(buf, mode="exec", transformer=None):
    'Extends compiler.parse to take a transformer.'
    if transformer is None:
        transformer = Transformer()
    if mode == "exec" or mode == "single":

src/c/o/codetools-HEAD/codetools/blocks/compiler_/compiler_.py   codetools(Download)
from compiler import pycodegen
from compiler.ast import Expression, Module
from compiler.transformer import Transformer
from copy import copy
import sys
def parse(buf, mode="exec", transformer=None):
    'Extends compiler.parse to take a transformer.'
    if transformer is None:
        transformer = Transformer()
    if mode == "exec" or mode == "single":

src/c/o/codetools-4.2.0/codetools/blocks/parser_.py   codetools(Download)
 
from compiler.ast import Module
from compiler.transformer import Transformer
import token
 
class BlockTransformer(Transformer, object):

src/c/o/codetools-HEAD/codetools/blocks/parser_.py   codetools(Download)
 
from compiler.ast import Module
from compiler.transformer import Transformer
import token
 
class BlockTransformer(Transformer, object):

src/s/y/sympy-polys-HEAD/sympy/core/ast_parser_python24.py   sympy-polys(Download)
import compiler
import parser
from compiler.transformer import Transformer
from compiler.ast import CallFunc, Name, Const
from compiler.pycodegen import ExpressionCodeGenerator
class SymPyTransformer(Transformer):
    def __init__(self, local_dict, global_dict):
        Transformer.__init__(self)
 
        self.symbol_class = 'Symbol'

src/p/y/pydoctor-0.5/pydoctor/astbuilder.py   pydoctor(Download)
class MyTransformer(transformer.Transformer):
    """Custom transformer that creates Nodes with L{str_with_orig} instances for docstrings."""
    def get_docstring(self, node, n=None):
        """Override C{transformer.Transformer.get_docstring} to return a L{str_with_orig} object."""
        if n is None:

src/m/y/mython-HEAD/basil/common/python/pyparser.py   mython(Download)
    def compile (self, filename = None):
        """STType.compile()
        """
        transformer = compiler.transformer.Transformer()
        compileAST = transformer.compile_node(self.totuple(1))

src/b/a/babbledrive-HEAD/generator-pydoctor/pydoctor/astbuilder.py   babbledrive(Download)
class MyTransformer(transformer.Transformer):
    """Custom transformer that creates Nodes with L{str_with_orig} instances for docstrings."""
    def get_docstring(self, node, n=None):
        """Override C{transformer.Transformer.get_docstring} to return a L{str_with_orig} object."""
        if n is None:

  1 | 2  Next