X7ROOT File Manager
Current Path:
/usr/lib64/python2.7/site-packages/coverage
usr
/
lib64
/
python2.7
/
site-packages
/
coverage
/
📁
..
📄
__init__.py
(4.4 KB)
📄
__init__.pyc
(2.29 KB)
📄
__init__.pyo
(2.29 KB)
📄
__main__.py
(100 B)
📄
__main__.pyc
(308 B)
📄
__main__.pyo
(308 B)
📄
annotate.py
(2.92 KB)
📄
annotate.pyc
(3.1 KB)
📄
annotate.pyo
(3.1 KB)
📄
backward.py
(3.97 KB)
📄
backward.pyc
(4.3 KB)
📄
backward.pyo
(4.3 KB)
📄
bytecode.py
(2.27 KB)
📄
bytecode.pyc
(3.29 KB)
📄
bytecode.pyo
(3.29 KB)
📄
cmdline.py
(24.16 KB)
📄
cmdline.pyc
(20.01 KB)
📄
cmdline.pyo
(19.96 KB)
📄
codeunit.py
(4.34 KB)
📄
codeunit.pyc
(5.19 KB)
📄
codeunit.pyo
(5.19 KB)
📄
collector.py
(12.7 KB)
📄
collector.pyc
(9.14 KB)
📄
collector.pyo
(9.08 KB)
📄
config.py
(6.86 KB)
📄
config.pyc
(7.67 KB)
📄
config.pyo
(7.67 KB)
📄
control.py
(26.58 KB)
📄
control.pyc
(21.95 KB)
📄
control.pyo
(21.95 KB)
📄
data.py
(8.63 KB)
📄
data.pyc
(9.65 KB)
📄
data.pyo
(9.65 KB)
📄
execfile.py
(4.78 KB)
📄
execfile.pyc
(3.45 KB)
📄
execfile.pyo
(3.45 KB)
📄
files.py
(9.8 KB)
📄
files.pyc
(10.62 KB)
📄
files.pyo
(10.62 KB)
📄
html.py
(11.84 KB)
📄
html.pyc
(11.24 KB)
📄
html.pyo
(11.15 KB)
📁
htmlfiles
📄
misc.py
(4.08 KB)
📄
misc.pyc
(6.13 KB)
📄
misc.pyo
(6.13 KB)
📄
parser.py
(23.65 KB)
📄
parser.pyc
(17.16 KB)
📄
parser.pyo
(17 KB)
📄
phystokens.py
(7.07 KB)
📄
phystokens.pyc
(5.3 KB)
📄
phystokens.pyo
(5.24 KB)
📄
report.py
(2.96 KB)
📄
report.pyc
(2.86 KB)
📄
report.pyo
(2.86 KB)
📄
results.py
(8.86 KB)
📄
results.pyc
(9.29 KB)
📄
results.pyo
(9.23 KB)
📄
summary.py
(2.9 KB)
📄
summary.pyc
(2.88 KB)
📄
summary.pyo
(2.88 KB)
📄
templite.py
(5.57 KB)
📄
templite.pyc
(4.8 KB)
📄
templite.pyo
(4.61 KB)
📄
tracer.so
(15.91 KB)
📄
version.py
(336 B)
📄
version.pyc
(361 B)
📄
version.pyo
(361 B)
📄
xmlreport.py
(5.57 KB)
📄
xmlreport.pyc
(4.86 KB)
📄
xmlreport.pyo
(4.86 KB)
Editing: execfile.py
"""Execute files of Python code.""" import imp, os, sys from coverage.backward import exec_code_object, open_source from coverage.misc import NoSource, ExceptionDuringRun try: # In Py 2.x, the builtins were in __builtin__ BUILTINS = sys.modules['__builtin__'] except KeyError: # In Py 3.x, they're in builtins BUILTINS = sys.modules['builtins'] def rsplit1(s, sep): """The same as s.rsplit(sep, 1), but works in 2.3""" parts = s.split(sep) return sep.join(parts[:-1]), parts[-1] def run_python_module(modulename, args): """Run a python module, as though with ``python -m name args...``. `modulename` is the name of the module, possibly a dot-separated name. `args` is the argument array to present as sys.argv, including the first element naming the module being executed. """ openfile = None glo, loc = globals(), locals() try: try: # Search for the module - inside its parent package, if any - using # standard import mechanics. if '.' in modulename: packagename, name = rsplit1(modulename, '.') package = __import__(packagename, glo, loc, ['__path__']) searchpath = package.__path__ else: packagename, name = None, modulename searchpath = None # "top-level search" in imp.find_module() openfile, pathname, _ = imp.find_module(name, searchpath) # Complain if this is a magic non-file module. if openfile is None and pathname is None: raise NoSource( "module does not live in a file: %r" % modulename ) # If `modulename` is actually a package, not a mere module, then we # pretend to be Python 2.7 and try running its __main__.py script. if openfile is None: packagename = modulename name = '__main__' package = __import__(packagename, glo, loc, ['__path__']) searchpath = package.__path__ openfile, pathname, _ = imp.find_module(name, searchpath) except ImportError: _, err, _ = sys.exc_info() raise NoSource(str(err)) finally: if openfile: openfile.close() # Finally, hand the file off to run_python_file for execution. args[0] = pathname run_python_file(pathname, args, package=packagename) def run_python_file(filename, args, package=None): """Run a python file as if it were the main program on the command line. `filename` is the path to the file to execute, it need not be a .py file. `args` is the argument array to present as sys.argv, including the first element naming the file being executed. `package` is the name of the enclosing package, if any. """ # Create a module to serve as __main__ old_main_mod = sys.modules['__main__'] main_mod = imp.new_module('__main__') sys.modules['__main__'] = main_mod main_mod.__file__ = filename if package: main_mod.__package__ = package main_mod.__builtins__ = BUILTINS # Set sys.argv and the first path element properly. old_argv = sys.argv old_path0 = sys.path[0] sys.argv = args if package: sys.path[0] = '' else: sys.path[0] = os.path.abspath(os.path.dirname(filename)) try: # 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") # Execute the source file. try: exec_code_object(code, main_mod.__dict__) except SystemExit: # The user called sys.exit(). Just pass it along to the upper # layers, where it will be handled. raise except: # Something went wrong while executing the user code. # Get the exc_info, and pack them into an exception that we can # throw up to the outer loop. We peel two layers off the traceback # so that the coverage.py code doesn't appear in the final printed # traceback. typ, err, tb = sys.exc_info() raise ExceptionDuringRun(typ, err, tb.tb_next.tb_next) finally: # Restore the old __main__ sys.modules['__main__'] = old_main_mod # Restore the old argv and path sys.argv = old_argv sys.path[0] = old_path0
Upload File
Create Folder