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: linecache.py
"""Cache lines from Python source files. This is intended to read lines from modules imported -- hence if a filename is not found, it will look down the module search path for a file by that name. """ import sys import os import tokenize __all__ = ["getline", "clearcache", "checkcache"] def getline(filename, lineno, module_globals=None): lines = getlines(filename, module_globals) if 1 <= lineno <= len(lines): return lines[lineno-1] else: return '' # The cache cache = {} # The cache def clearcache(): """Clear the cache entirely.""" global cache cache = {} def getlines(filename, module_globals=None): """Get the lines for a Python source file from the cache. Update the cache if it doesn't contain an entry for this file already.""" if filename in cache: return cache[filename][2] try: return updatecache(filename, module_globals) except MemoryError: clearcache() return [] def checkcache(filename=None): """Discard cache entries that are out of date. (This is not checked upon each call!)""" if filename is None: filenames = list(cache.keys()) else: if filename in cache: filenames = [filename] else: return for filename in filenames: size, mtime, lines, fullname = cache[filename] if mtime is None: continue # no-op for files loaded via a __loader__ try: stat = os.stat(fullname) except OSError: del cache[filename] continue if size != stat.st_size or mtime != stat.st_mtime: del cache[filename] def updatecache(filename, module_globals=None): """Update a cache entry and return its list of lines. If something's wrong, print a message, discard the cache entry, and return an empty list.""" if filename in cache: del cache[filename] if not filename or (filename.startswith('<') and filename.endswith('>')): return [] fullname = filename try: stat = os.stat(fullname) except OSError: basename = filename # Try for a __loader__, if available if module_globals and '__loader__' in module_globals: name = module_globals.get('__name__') loader = module_globals['__loader__'] get_source = getattr(loader, 'get_source', None) if name and get_source: try: data = get_source(name) except (ImportError, OSError): pass else: if data is None: # No luck, the PEP302 loader cannot find the source # for this module. return [] cache[filename] = ( len(data), None, [line+'\n' for line in data.splitlines()], fullname ) return cache[filename][2] # Try looking through the module search path, which is only useful # when handling a relative filename. if os.path.isabs(filename): return [] for dirname in sys.path: try: fullname = os.path.join(dirname, basename) except (TypeError, AttributeError): # Not sufficiently string-like to do anything useful with. continue try: stat = os.stat(fullname) break except OSError: pass else: return [] try: with tokenize.open(fullname) as fp: lines = fp.readlines() except OSError: return [] if lines and not lines[-1].endswith('\n'): lines[-1] += '\n' size, mtime = stat.st_size, stat.st_mtime cache[filename] = size, mtime, lines, fullname return lines
Upload File
Create Folder