virtualEnvironment/lib/python2.7/site-packages/coverage/execfile.py
def make_code_from_py(filename):
    """Get source from `filename` and make a code object of it."""
    # Open the source file.
    try:
        source_file = open_source(filename)
    except IOError:
        raise NoSource("No file to run: %r" % filename)

    try:
        source = source_file.read()
    finally:
        source_file.close()

    # We have the source.  `compile` still needs the last line to be clean,
    # so make sure it is, then compile a code object from it.
    if not source or source[-1] != '\n':
        source += '\n'
    code = compile(source, filename, "exec")

    return code
def make_code_from_py(filename):
    # Open the source file.
    try:
        source_file = open_source(filename)
    except IOError:
        raise NoSource("No file to run: %r" % filename)

    try:
        source = source_file.read()
    finally:
        source_file.close()

    # We have the source.  `compile` still needs the last line to be clean,
    # so make sure it is, then compile a code object from it.
    if not source or source[-1] != '\n':
        source += '\n'
    code = compile(source, filename, "exec")

    return code
def make_code_from_py ( filename ) : # Open the source file. try : source_file = open_source ( filename ) except IOError : raise NoSource ( "No file to run: %r" % filename ) try : source = source_file . read ( ) finally : source_file . close ( ) # We have the source.  `compile` still needs the last line to be clean, # so make sure it is, then compile a code object from it. if not source or source [ - 1 ] != '\n' : source += '\n' code = compile ( source , filename , "exec" ) return code
Get source from `filename` and make a code object of it.
Get source from filename and make a code object of it .