예제 #1
0
def mread(s):
    """
    Read module from string
    """
    ast = parse(s)

    if opts.ddump_parse:
        logging.info(ast)

    return build_module(ast)
예제 #2
0
def mread(s):
    """
    Read module from string
    """
    ast = parse(s)

    if opts.ddump_parse:
        logging.info(ast)

    return build_module(ast)
예제 #3
0
def mopen(f):
    """
    Read module from file
    """
    fd = open(f)
    contents = fd.read()
    ast = parse(contents)

    if opts.ddump_parse:
        logging.info(ast)

    return build_module(ast)
예제 #4
0
def mopen(f):
    """
    Read module from file
    """
    fd = open(f)
    contents = fd.read()
    ast = parse(contents)

    if opts.ddump_parse:
        logging.info(ast)

    return build_module(ast)