PATH: //proc/self/root/proc/self/root/opt/alt/python36/lib64/python3.6
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
π __future__.py
β
X
π __phello__.foo.py
β
X
π __pycache__/
X
π _bootlocale.py
β
X
π _collections_abc.py
β
X
π _compat_pickle.py
β
X
π _compression.py
β
X
π _dummy_thread.py
β
X
π _markupbase.py
β
X
π _osx_support.py
β
X
π _pydecimal.py
β
X
π _pyio.py
β
X
π _sitebuiltins.py
β
X
π _strptime.py
β
X
π _sysconfigdata_dm_linux_x86_64-linux-gnu.py
β
X
π _sysconfigdata_m_linux_x86_64-linux-gnu.py
β
X
π _threading_local.py
β
X
π _weakrefset.py
β
X
π abc.py
β
X
π aifc.py
β
X
π antigravity.py
β
X
π argparse.py
β
X
π ast.py
β
X
π asynchat.py
β
X
π asyncio/
X
π asyncore.py
β
X
π base64.py
β
X
π bdb.py
β
X
π binhex.py
β
X
π bisect.py
β
X
π bz2.py
β
X
π cProfile.py
β
X
π calendar.py
β
X
π cgi.py
β
X
π cgitb.py
β
X
π chunk.py
β
X
π cmd.py
β
X
π code.py
β
X
π codecs.py
β
X
π codeop.py
β
X
π collections/
X
π colorsys.py
β
X
π compileall.py
β
X
π concurrent/
X
π config-3.6m/
X
π configparser.py
β
X
π contextlib.py
β
X
π copy.py
β
X
π copyreg.py
β
X
π crypt.py
β
X
π csv.py
β
X
π ctypes/
X
π curses/
X
π datetime.py
β
X
π dbm/
X
π decimal.py
β
X
π difflib.py
β
X
π dis.py
β
X
π distutils/
X
π doctest.py
β
X
π dummy_threading.py
β
X
π email/
X
π encodings/
X
π ensurepip/
X
π enum.py
β
X
π filecmp.py
β
X
π fileinput.py
β
X
π fnmatch.py
β
X
π formatter.py
β
X
π fractions.py
β
X
π ftplib.py
β
X
π functools.py
β
X
π genericpath.py
β
X
π getopt.py
β
X
π getpass.py
β
X
π gettext.py
β
X
π glob.py
β
X
π gzip.py
β
X
π hashlib.py
β
X
π heapq.py
β
X
π hmac.py
β
X
π html/
X
π http/
X
π idlelib/
X
π imaplib.py
β
X
π imghdr.py
β
X
π imp.py
β
X
π importlib/
X
π inspect.py
β
X
π io.py
β
X
π ipaddress.py
β
X
π json/
X
π keyword.py
β
X
π lib-dynload/
X
π lib2to3/
X
π linecache.py
β
X
π locale.py
β
X
π logging/
X
π lzma.py
β
X
π macpath.py
β
X
π macurl2path.py
β
X
π mailbox.py
β
X
π mailcap.py
β
X
π mimetypes.py
β
X
π modulefinder.py
β
X
π multiprocessing/
X
π netrc.py
β
X
π nntplib.py
β
X
π ntpath.py
β
X
π nturl2path.py
β
X
π numbers.py
β
X
π opcode.py
β
X
π operator.py
β
X
π optparse.py
β
X
π os.py
β
X
π pathlib.py
β
X
π pdb.py
β
X
π pickle.py
β
X
π pickletools.py
β
X
π pipes.py
β
X
π pkgutil.py
β
X
π platform.py
β
X
π plistlib.py
β
X
π poplib.py
β
X
π posixpath.py
β
X
π pprint.py
β
X
π profile.py
β
X
π pstats.py
β
X
π pty.py
β
X
π py_compile.py
β
X
π pyclbr.py
β
X
π pydoc.py
β
X
π pydoc_data/
X
π queue.py
β
X
π quopri.py
β
X
π random.py
β
X
π re.py
β
X
π reprlib.py
β
X
π rlcompleter.py
β
X
π runpy.py
β
X
π sched.py
β
X
π secrets.py
β
X
π selectors.py
β
X
π shelve.py
β
X
π shlex.py
β
X
π shutil.py
β
X
π signal.py
β
X
π site-packages/
X
π site.py
β
X
π smtpd.py
β
X
π smtplib.py
β
X
π sndhdr.py
β
X
π socket.py
β
X
π socketserver.py
β
X
π sqlite3/
X
π sre_compile.py
β
X
π sre_constants.py
β
X
π sre_parse.py
β
X
π ssl.py
β
X
π stat.py
β
X
π statistics.py
β
X
π string.py
β
X
π stringprep.py
β
X
π struct.py
β
X
π subprocess.py
β
X
π sunau.py
β
X
π symbol.py
β
X
π symtable.py
β
X
π sysconfig.py
β
X
π tabnanny.py
β
X
π tarfile.py
β
X
π telnetlib.py
β
X
π tempfile.py
β
X
π test/
X
π textwrap.py
β
X
π this.py
β
X
π threading.py
β
X
π timeit.py
β
X
π token.py
β
X
π tokenize.py
β
X
π trace.py
β
X
π traceback.py
β
X
π tracemalloc.py
β
X
π tty.py
β
X
π types.py
β
X
π typing.py
β
X
π unittest/
X
π urllib/
X
π uu.py
β
X
π uuid.py
β
X
π venv/
X
π warnings.py
β
X
π wave.py
β
X
π weakref.py
β
X
π webbrowser.py
β
X
π wsgiref/
X
π xdrlib.py
β
X
π xml/
X
π xmlrpc/
X
π zipapp.py
β
X
π zipfile.py
β
X
SAVING...
BERHASIL DIUBAH!
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 functools 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 # The cache. Maps filenames to either a thunk which will provide source code, # or a tuple (size, mtime, lines, fullname) once loaded. 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: entry = cache[filename] if len(entry) != 1: 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: entry = cache[filename] if len(entry) == 1: # lazy cache entry, leave it lazy. continue size, mtime, lines, fullname = entry 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: if len(cache[filename]) != 1: del cache[filename] if not filename or (filename.startswith('<') and filename.endswith('>')): return [] fullname = filename try: stat = os.stat(fullname) except OSError: basename = filename # Realise a lazy loader based lookup if there is one # otherwise try to lookup right now. if lazycache(filename, module_globals): try: data = cache[filename][0]() 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 def lazycache(filename, module_globals): """Seed the cache for filename with module_globals. The module loader will be asked for the source only when getlines is called, not immediately. If there is an entry in the cache already, it is not altered. :return: True if a lazy load is registered in the cache, otherwise False. To register such a load a module loader with a get_source method must be found, the filename must be a cachable filename, and the filename must not be already cached. """ if filename in cache: if len(cache[filename]) == 1: return True else: return False if not filename or (filename.startswith('<') and filename.endswith('>')): return False # 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: get_lines = functools.partial(get_source, name) cache[filename] = (get_lines,) return True return False
SIMPAN PERUBAHAN