X7ROOT File Manager
Current Path:
/opt/alt/python34/lib64/python3.4
opt
/
alt
/
python34
/
lib64
/
python3.4
/
ðŸ“
..
📄
__future__.py
(4.48 KB)
📄
__phello__.foo.py
(64 B)
ðŸ“
__pycache__
📄
_bootlocale.py
(1.27 KB)
📄
_collections_abc.py
(19.43 KB)
📄
_compat_pickle.py
(8.12 KB)
📄
_dummy_thread.py
(4.76 KB)
📄
_markupbase.py
(14.26 KB)
📄
_osx_support.py
(18.65 KB)
📄
_pyio.py
(72.16 KB)
📄
_sitebuiltins.py
(3.04 KB)
📄
_strptime.py
(21.54 KB)
📄
_sysconfigdata.py
(28.05 KB)
📄
_threading_local.py
(7.24 KB)
📄
_weakrefset.py
(5.57 KB)
📄
abc.py
(8.42 KB)
📄
aifc.py
(30.84 KB)
📄
antigravity.py
(475 B)
📄
argparse.py
(87.92 KB)
📄
ast.py
(11.75 KB)
📄
asynchat.py
(11.55 KB)
ðŸ“
asyncio
📄
asyncore.py
(20.51 KB)
📄
base64.py
(19.71 KB)
📄
bdb.py
(22.81 KB)
📄
binhex.py
(13.6 KB)
📄
bisect.py
(2.53 KB)
📄
bz2.py
(18.42 KB)
📄
cProfile.py
(5.2 KB)
📄
calendar.py
(22.4 KB)
📄
cgi.py
(35.1 KB)
📄
cgitb.py
(11.76 KB)
📄
chunk.py
(5.3 KB)
📄
cmd.py
(14.51 KB)
📄
code.py
(9.8 KB)
📄
codecs.py
(35.07 KB)
📄
codeop.py
(5.85 KB)
ðŸ“
collections
📄
colorsys.py
(3.97 KB)
📄
compileall.py
(9.39 KB)
ðŸ“
concurrent
ðŸ“
config-3.4m
📄
configparser.py
(48.53 KB)
📄
contextlib.py
(11.37 KB)
📄
copy.py
(8.79 KB)
📄
copyreg.py
(6.67 KB)
📄
crypt.py
(1.83 KB)
📄
csv.py
(15.81 KB)
ðŸ“
ctypes
ðŸ“
curses
📄
datetime.py
(74.03 KB)
ðŸ“
dbm
📄
decimal.py
(223.33 KB)
📄
difflib.py
(79.77 KB)
📄
dis.py
(16.76 KB)
ðŸ“
distutils
📄
doctest.py
(102.04 KB)
📄
dummy_threading.py
(2.75 KB)
ðŸ“
email
ðŸ“
encodings
ðŸ“
ensurepip
📄
enum.py
(21.03 KB)
📄
filecmp.py
(9.6 KB)
📄
fileinput.py
(14.52 KB)
📄
fnmatch.py
(3.09 KB)
📄
formatter.py
(14.82 KB)
📄
fractions.py
(22.66 KB)
📄
ftplib.py
(37.63 KB)
📄
functools.py
(27.84 KB)
📄
genericpath.py
(3.79 KB)
📄
getopt.py
(7.31 KB)
📄
getpass.py
(5.93 KB)
📄
gettext.py
(20.28 KB)
📄
glob.py
(3.38 KB)
📄
gzip.py
(23.74 KB)
📄
hashlib.py
(9.62 KB)
📄
heapq.py
(17.58 KB)
📄
hmac.py
(4.94 KB)
ðŸ“
html
ðŸ“
http
ðŸ“
idlelib
📄
imaplib.py
(49.09 KB)
📄
imghdr.py
(3.45 KB)
📄
imp.py
(9.75 KB)
ðŸ“
importlib
📄
inspect.py
(102.19 KB)
📄
io.py
(3.32 KB)
📄
ipaddress.py
(69.92 KB)
ðŸ“
json
📄
keyword.py
(2.17 KB)
ðŸ“
lib-dynload
ðŸ“
lib2to3
📄
linecache.py
(3.86 KB)
📄
locale.py
(72.78 KB)
ðŸ“
logging
📄
lzma.py
(18.92 KB)
📄
macpath.py
(5.49 KB)
📄
macurl2path.py
(2.67 KB)
📄
mailbox.py
(76.54 KB)
📄
mailcap.py
(7.26 KB)
📄
mimetypes.py
(20.29 KB)
📄
modulefinder.py
(22.87 KB)
ðŸ“
multiprocessing
📄
netrc.py
(5.61 KB)
📄
nntplib.py
(42.07 KB)
📄
ntpath.py
(20 KB)
📄
nturl2path.py
(2.39 KB)
📄
numbers.py
(10 KB)
📄
opcode.py
(5.31 KB)
📄
operator.py
(8.98 KB)
📄
optparse.py
(58.93 KB)
📄
os.py
(33.09 KB)
📄
pathlib.py
(41.47 KB)
📄
pdb.py
(59.56 KB)
📄
pickle.py
(54.68 KB)
📄
pickletools.py
(89.61 KB)
📄
pipes.py
(8.71 KB)
📄
pkgutil.py
(20.72 KB)
ðŸ“
plat-linux
📄
platform.py
(45.67 KB)
📄
plistlib.py
(31.05 KB)
📄
poplib.py
(13.98 KB)
📄
posixpath.py
(13.13 KB)
📄
pprint.py
(14.57 KB)
📄
profile.py
(21.52 KB)
📄
pstats.py
(25.7 KB)
📄
pty.py
(4.65 KB)
📄
py_compile.py
(6.94 KB)
📄
pyclbr.py
(13.2 KB)
📄
pydoc.py
(100.6 KB)
ðŸ“
pydoc_data
📄
queue.py
(8.63 KB)
📄
quopri.py
(7.09 KB)
📄
random.py
(25.47 KB)
📄
re.py
(15.24 KB)
📄
reprlib.py
(4.99 KB)
📄
rlcompleter.py
(5.93 KB)
📄
runpy.py
(10.56 KB)
📄
sched.py
(6.21 KB)
📄
selectors.py
(16.7 KB)
📄
shelve.py
(8.33 KB)
📄
shlex.py
(11.28 KB)
📄
shutil.py
(38.97 KB)
ðŸ“
site-packages
📄
site.py
(21.05 KB)
📄
smtpd.py
(29.29 KB)
📄
smtplib.py
(38.06 KB)
📄
sndhdr.py
(6.11 KB)
📄
socket.py
(18.62 KB)
📄
socketserver.py
(23.8 KB)
ðŸ“
sqlite3
📄
sre_compile.py
(19.44 KB)
📄
sre_constants.py
(7.1 KB)
📄
sre_parse.py
(30.69 KB)
📄
ssl.py
(33.93 KB)
📄
stat.py
(4.3 KB)
📄
statistics.py
(19.1 KB)
📄
string.py
(11.18 KB)
📄
stringprep.py
(12.61 KB)
📄
struct.py
(257 B)
📄
subprocess.py
(63.04 KB)
📄
sunau.py
(17.67 KB)
📄
symbol.py
(2 KB)
📄
symtable.py
(7.23 KB)
📄
sysconfig.py
(24.05 KB)
📄
tabnanny.py
(11.14 KB)
📄
tarfile.py
(89.41 KB)
📄
telnetlib.py
(22.53 KB)
📄
tempfile.py
(22 KB)
ðŸ“
test
📄
textwrap.py
(18.83 KB)
📄
this.py
(1003 B)
📄
threading.py
(47.66 KB)
📄
timeit.py
(11.69 KB)
📄
token.py
(2.96 KB)
📄
tokenize.py
(25 KB)
📄
trace.py
(30.75 KB)
📄
traceback.py
(10.91 KB)
📄
tracemalloc.py
(15.28 KB)
📄
tty.py
(879 B)
📄
types.py
(5.28 KB)
ðŸ“
unittest
ðŸ“
urllib
📄
uu.py
(6.61 KB)
📄
uuid.py
(23.17 KB)
ðŸ“
venv
📄
warnings.py
(13.97 KB)
📄
wave.py
(17.27 KB)
📄
weakref.py
(18.93 KB)
📄
webbrowser.py
(20.93 KB)
ðŸ“
wsgiref
📄
xdrlib.py
(5.77 KB)
ðŸ“
xml
ðŸ“
xmlrpc
📄
zipfile.py
(66.94 KB)
Editing: cProfile.py
#! /opt/alt/python34/bin/python3.4 """Python interface for the 'lsprof' profiler. Compatible with the 'profile' module. """ __all__ = ["run", "runctx", "Profile"] import _lsprof import profile as _pyprofile # ____________________________________________________________ # Simple interface def run(statement, filename=None, sort=-1): return _pyprofile._Utils(Profile).run(statement, filename, sort) def runctx(statement, globals, locals, filename=None, sort=-1): return _pyprofile._Utils(Profile).runctx(statement, globals, locals, filename, sort) run.__doc__ = _pyprofile.run.__doc__ runctx.__doc__ = _pyprofile.runctx.__doc__ # ____________________________________________________________ class Profile(_lsprof.Profiler): """Profile(custom_timer=None, time_unit=None, subcalls=True, builtins=True) Builds a profiler object using the specified timer function. The default timer is a fast built-in one based on real time. For custom timer functions returning integers, time_unit can be a float specifying a scale (i.e. how long each integer unit is, in seconds). """ # Most of the functionality is in the base class. # This subclass only adds convenient and backward-compatible methods. def print_stats(self, sort=-1): import pstats pstats.Stats(self).strip_dirs().sort_stats(sort).print_stats() def dump_stats(self, file): import marshal with open(file, 'wb') as f: self.create_stats() marshal.dump(self.stats, f) def create_stats(self): self.disable() self.snapshot_stats() def snapshot_stats(self): entries = self.getstats() self.stats = {} callersdicts = {} # call information for entry in entries: func = label(entry.code) nc = entry.callcount # ncalls column of pstats (before '/') cc = nc - entry.reccallcount # ncalls column of pstats (after '/') tt = entry.inlinetime # tottime column of pstats ct = entry.totaltime # cumtime column of pstats callers = {} callersdicts[id(entry.code)] = callers self.stats[func] = cc, nc, tt, ct, callers # subcall information for entry in entries: if entry.calls: func = label(entry.code) for subentry in entry.calls: try: callers = callersdicts[id(subentry.code)] except KeyError: continue nc = subentry.callcount cc = nc - subentry.reccallcount tt = subentry.inlinetime ct = subentry.totaltime if func in callers: prev = callers[func] nc += prev[0] cc += prev[1] tt += prev[2] ct += prev[3] callers[func] = nc, cc, tt, ct # The following two methods can be called by clients to use # a profiler to profile a statement, given as a string. def run(self, cmd): import __main__ dict = __main__.__dict__ return self.runctx(cmd, dict, dict) def runctx(self, cmd, globals, locals): self.enable() try: exec(cmd, globals, locals) finally: self.disable() return self # This method is more useful to profile a single function call. def runcall(self, func, *args, **kw): self.enable() try: return func(*args, **kw) finally: self.disable() # ____________________________________________________________ def label(code): if isinstance(code, str): return ('~', 0, code) # built-in functions ('~' sorts at the end) else: return (code.co_filename, code.co_firstlineno, code.co_name) # ____________________________________________________________ def main(): import os, sys from optparse import OptionParser usage = "cProfile.py [-o output_file_path] [-s sort] scriptfile [arg] ..." parser = OptionParser(usage=usage) parser.allow_interspersed_args = False parser.add_option('-o', '--outfile', dest="outfile", help="Save stats to <outfile>", default=None) parser.add_option('-s', '--sort', dest="sort", help="Sort order when printing to stdout, based on pstats.Stats class", default=-1) if not sys.argv[1:]: parser.print_usage() sys.exit(2) (options, args) = parser.parse_args() sys.argv[:] = args if len(args) > 0: progname = args[0] sys.path.insert(0, os.path.dirname(progname)) with open(progname, 'rb') as fp: code = compile(fp.read(), progname, 'exec') globs = { '__file__': progname, '__name__': '__main__', '__package__': None, '__cached__': None, } runctx(code, globs, None, options.outfile, options.sort) else: parser.print_usage() return parser # When invoked as main program, invoke the profiler on a script if __name__ == '__main__': main()
Upload File
Create Folder