X7ROOT File Manager
Current Path:
/opt/alt/python313/lib64/python3.13
opt
/
alt
/
python313
/
lib64
/
python3.13
/
ðŸ“
..
📄
LICENSE.txt
(13.49 KB)
📄
__future__.py
(5.1 KB)
📄
__hello__.py
(227 B)
ðŸ“
__pycache__
📄
_aix_support.py
(3.93 KB)
📄
_android_support.py
(6.73 KB)
📄
_apple_support.py
(2.2 KB)
📄
_collections_abc.py
(31.51 KB)
📄
_colorize.py
(2.78 KB)
📄
_compat_pickle.py
(8.53 KB)
📄
_compression.py
(5.55 KB)
📄
_ios_support.py
(2.61 KB)
📄
_markupbase.py
(14.31 KB)
📄
_opcode_metadata.py
(9.05 KB)
📄
_osx_support.py
(21.51 KB)
📄
_py_abc.py
(6.04 KB)
📄
_pydatetime.py
(89.83 KB)
📄
_pydecimal.py
(221.96 KB)
📄
_pyio.py
(91.1 KB)
📄
_pylong.py
(11.55 KB)
ðŸ“
_pyrepl
📄
_sitebuiltins.py
(3.05 KB)
📄
_strptime.py
(28.69 KB)
📄
_sysconfigdata__linux_x86_64-linux-gnu.py
(65.62 KB)
📄
_sysconfigdata_d_linux_x86_64-linux-gnu.py
(65.6 KB)
📄
_threading_local.py
(7.05 KB)
📄
_weakrefset.py
(5.75 KB)
📄
abc.py
(6.38 KB)
📄
antigravity.py
(500 B)
📄
argparse.py
(99.27 KB)
📄
ast.py
(63.91 KB)
ðŸ“
asyncio
📄
base64.py
(21.14 KB)
📄
bdb.py
(34.51 KB)
📄
bisect.py
(3.34 KB)
📄
bz2.py
(11.69 KB)
📄
cProfile.py
(6.48 KB)
📄
calendar.py
(25.47 KB)
📄
cmd.py
(14.96 KB)
📄
code.py
(12.86 KB)
📄
codecs.py
(36.06 KB)
📄
codeop.py
(5.69 KB)
ðŸ“
collections
📄
colorsys.py
(3.97 KB)
📄
compileall.py
(20.18 KB)
ðŸ“
concurrent
ðŸ“
config-3.13-x86_64-linux-gnu
📄
configparser.py
(52.51 KB)
📄
contextlib.py
(27.15 KB)
📄
contextvars.py
(129 B)
📄
copy.py
(8.76 KB)
📄
copyreg.py
(7.44 KB)
📄
csv.py
(18.73 KB)
ðŸ“
ctypes
ðŸ“
curses
📄
dataclasses.py
(63.03 KB)
📄
datetime.py
(268 B)
ðŸ“
dbm
📄
decimal.py
(2.73 KB)
📄
difflib.py
(81.41 KB)
📄
dis.py
(40 KB)
📄
doctest.py
(106.77 KB)
ðŸ“
email
ðŸ“
encodings
ðŸ“
ensurepip
📄
enum.py
(83.48 KB)
📄
filecmp.py
(10.4 KB)
📄
fileinput.py
(15.35 KB)
📄
fnmatch.py
(6.04 KB)
📄
fractions.py
(39.08 KB)
📄
ftplib.py
(33.92 KB)
📄
functools.py
(38.21 KB)
📄
genericpath.py
(5.84 KB)
📄
getopt.py
(7.31 KB)
📄
getpass.py
(6.09 KB)
📄
gettext.py
(21.03 KB)
📄
glob.py
(19.26 KB)
📄
graphlib.py
(9.42 KB)
📄
gzip.py
(24.06 KB)
📄
hashlib.py
(9.13 KB)
📄
heapq.py
(22.48 KB)
📄
hmac.py
(7.54 KB)
ðŸ“
html
ðŸ“
http
📄
imaplib.py
(52.77 KB)
ðŸ“
importlib
📄
inspect.py
(124.36 KB)
📄
io.py
(3.5 KB)
📄
ipaddress.py
(79.23 KB)
ðŸ“
json
📄
keyword.py
(1.05 KB)
ðŸ“
lib-dynload
📄
linecache.py
(7.11 KB)
📄
locale.py
(77.13 KB)
ðŸ“
logging
📄
lzma.py
(13.08 KB)
📄
mailbox.py
(79.73 KB)
📄
mimetypes.py
(23.29 KB)
📄
modulefinder.py
(23.23 KB)
ðŸ“
multiprocessing
📄
netrc.py
(6.76 KB)
📄
ntpath.py
(31.54 KB)
📄
nturl2path.py
(2.32 KB)
📄
numbers.py
(11.2 KB)
📄
opcode.py
(2.76 KB)
📄
operator.py
(10.72 KB)
📄
optparse.py
(58.95 KB)
📄
os.py
(40.62 KB)
ðŸ“
pathlib
📄
pdb.py
(88.81 KB)
📄
pickle.py
(65.39 KB)
📄
pickletools.py
(91.85 KB)
📄
pkgutil.py
(17.85 KB)
📄
platform.py
(46.25 KB)
📄
plistlib.py
(29.1 KB)
📄
poplib.py
(14.26 KB)
📄
posixpath.py
(17.53 KB)
📄
pprint.py
(23.59 KB)
📄
profile.py
(22.61 KB)
📄
pstats.py
(28.61 KB)
📄
pty.py
(5.99 KB)
📄
py_compile.py
(7.65 KB)
📄
pyclbr.py
(11.13 KB)
📄
pydoc.py
(107.49 KB)
ðŸ“
pydoc_data
📄
queue.py
(13.17 KB)
📄
quopri.py
(7.03 KB)
📄
random.py
(36.14 KB)
ðŸ“
re
📄
reprlib.py
(7.02 KB)
📄
rlcompleter.py
(7.73 KB)
📄
runpy.py
(12.58 KB)
📄
sched.py
(6.2 KB)
📄
secrets.py
(1.94 KB)
📄
selectors.py
(19 KB)
📄
shelve.py
(8.6 KB)
📄
shlex.py
(13.04 KB)
📄
shutil.py
(56.12 KB)
📄
signal.py
(2.44 KB)
ðŸ“
site-packages
📄
site.py
(24.79 KB)
📄
smtplib.py
(42.52 KB)
📄
socket.py
(36.87 KB)
📄
socketserver.py
(27.41 KB)
ðŸ“
sqlite3
📄
sre_compile.py
(231 B)
📄
sre_constants.py
(232 B)
📄
sre_parse.py
(229 B)
📄
ssl.py
(51.47 KB)
📄
stat.py
(6 KB)
📄
statistics.py
(60.38 KB)
📄
string.py
(11.51 KB)
📄
stringprep.py
(12.61 KB)
📄
struct.py
(257 B)
📄
subprocess.py
(87.15 KB)
📄
symtable.py
(13.87 KB)
ðŸ“
sysconfig
📄
tabnanny.py
(11.27 KB)
📄
tarfile.py
(107.5 KB)
📄
tempfile.py
(31.61 KB)
📄
textwrap.py
(19.47 KB)
📄
this.py
(1003 B)
📄
threading.py
(53.87 KB)
📄
timeit.py
(13.16 KB)
📄
token.py
(2.43 KB)
📄
tokenize.py
(21.06 KB)
ðŸ“
tomllib
📄
trace.py
(29.03 KB)
📄
traceback.py
(64.31 KB)
📄
tracemalloc.py
(17.62 KB)
📄
tty.py
(1.99 KB)
📄
types.py
(10.94 KB)
📄
typing.py
(129.61 KB)
ðŸ“
unittest
ðŸ“
urllib
📄
uuid.py
(28.46 KB)
ðŸ“
venv
📄
warnings.py
(26.32 KB)
📄
wave.py
(22.69 KB)
📄
weakref.py
(21.01 KB)
📄
webbrowser.py
(23.73 KB)
ðŸ“
wsgiref
ðŸ“
xml
ðŸ“
xmlrpc
📄
zipapp.py
(8.42 KB)
ðŸ“
zipfile
📄
zipimport.py
(32.12 KB)
ðŸ“
zoneinfo
Editing: copyreg.py
"""Helper to provide extensibility for pickle. This is only useful to add pickle support for extension types defined in C, not for instances of user-defined classes. """ __all__ = ["pickle", "constructor", "add_extension", "remove_extension", "clear_extension_cache"] dispatch_table = {} def pickle(ob_type, pickle_function, constructor_ob=None): if not callable(pickle_function): raise TypeError("reduction functions must be callable") dispatch_table[ob_type] = pickle_function # The constructor_ob function is a vestige of safe for unpickling. # There is no reason for the caller to pass it anymore. if constructor_ob is not None: constructor(constructor_ob) def constructor(object): if not callable(object): raise TypeError("constructors must be callable") # Example: provide pickling support for complex numbers. def pickle_complex(c): return complex, (c.real, c.imag) pickle(complex, pickle_complex, complex) def pickle_union(obj): import functools, operator return functools.reduce, (operator.or_, obj.__args__) pickle(type(int | str), pickle_union) # Support for pickling new-style objects def _reconstructor(cls, base, state): if base is object: obj = object.__new__(cls) else: obj = base.__new__(cls, state) if base.__init__ != object.__init__: base.__init__(obj, state) return obj _HEAPTYPE = 1<<9 _new_type = type(int.__new__) # Python code for object.__reduce_ex__ for protocols 0 and 1 def _reduce_ex(self, proto): assert proto < 2 cls = self.__class__ for base in cls.__mro__: if hasattr(base, '__flags__') and not base.__flags__ & _HEAPTYPE: break new = base.__new__ if isinstance(new, _new_type) and new.__self__ is base: break else: base = object # not really reachable if base is object: state = None else: if base is cls: raise TypeError(f"cannot pickle {cls.__name__!r} object") state = base(self) args = (cls, base, state) try: getstate = self.__getstate__ except AttributeError: if getattr(self, "__slots__", None): raise TypeError(f"cannot pickle {cls.__name__!r} object: " f"a class that defines __slots__ without " f"defining __getstate__ cannot be pickled " f"with protocol {proto}") from None try: dict = self.__dict__ except AttributeError: dict = None else: if (type(self).__getstate__ is object.__getstate__ and getattr(self, "__slots__", None)): raise TypeError("a class that defines __slots__ without " "defining __getstate__ cannot be pickled") dict = getstate() if dict: return _reconstructor, args, dict else: return _reconstructor, args # Helper for __reduce_ex__ protocol 2 def __newobj__(cls, *args): return cls.__new__(cls, *args) def __newobj_ex__(cls, args, kwargs): """Used by pickle protocol 4, instead of __newobj__ to allow classes with keyword-only arguments to be pickled correctly. """ return cls.__new__(cls, *args, **kwargs) def _slotnames(cls): """Return a list of slot names for a given class. This needs to find slots defined by the class and its bases, so we can't simply return the __slots__ attribute. We must walk down the Method Resolution Order and concatenate the __slots__ of each class found there. (This assumes classes don't modify their __slots__ attribute to misrepresent their slots after the class is defined.) """ # Get the value from a cache in the class if possible names = cls.__dict__.get("__slotnames__") if names is not None: return names # Not cached -- calculate the value names = [] if not hasattr(cls, "__slots__"): # This class has no slots pass else: # Slots found -- gather slot names from all base classes for c in cls.__mro__: if "__slots__" in c.__dict__: slots = c.__dict__['__slots__'] # if class has a single slot, it can be given as a string if isinstance(slots, str): slots = (slots,) for name in slots: # special descriptors if name in ("__dict__", "__weakref__"): continue # mangled names elif name.startswith('__') and not name.endswith('__'): stripped = c.__name__.lstrip('_') if stripped: names.append('_%s%s' % (stripped, name)) else: names.append(name) else: names.append(name) # Cache the outcome in the class if at all possible try: cls.__slotnames__ = names except: pass # But don't die if we can't return names # A registry of extension codes. This is an ad-hoc compression # mechanism. Whenever a global reference to <module>, <name> is about # to be pickled, the (<module>, <name>) tuple is looked up here to see # if it is a registered extension code for it. Extension codes are # universal, so that the meaning of a pickle does not depend on # context. (There are also some codes reserved for local use that # don't have this restriction.) Codes are positive ints; 0 is # reserved. _extension_registry = {} # key -> code _inverted_registry = {} # code -> key _extension_cache = {} # code -> object # Don't ever rebind those names: pickling grabs a reference to them when # it's initialized, and won't see a rebinding. def add_extension(module, name, code): """Register an extension code.""" code = int(code) if not 1 <= code <= 0x7fffffff: raise ValueError("code out of range") key = (module, name) if (_extension_registry.get(key) == code and _inverted_registry.get(code) == key): return # Redundant registrations are benign if key in _extension_registry: raise ValueError("key %s is already registered with code %s" % (key, _extension_registry[key])) if code in _inverted_registry: raise ValueError("code %s is already in use for key %s" % (code, _inverted_registry[code])) _extension_registry[key] = code _inverted_registry[code] = key def remove_extension(module, name, code): """Unregister an extension code. For testing only.""" key = (module, name) if (_extension_registry.get(key) != code or _inverted_registry.get(code) != key): raise ValueError("key %s is not registered with code %s" % (key, code)) del _extension_registry[key] del _inverted_registry[code] if code in _extension_cache: del _extension_cache[code] def clear_extension_cache(): _extension_cache.clear() # Standard extension code assignments # Reserved ranges # First Last Count Purpose # 1 127 127 Reserved for Python standard library # 128 191 64 Reserved for Zope # 192 239 48 Reserved for 3rd parties # 240 255 16 Reserved for private use (will never be assigned) # 256 Inf Inf Reserved for future assignment # Extension codes are assigned by the Python Software Foundation.
Upload File
Create Folder