D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python3.6
/
site-packages
/
pip
/
_vendor
/
distlib
/
_backport
/
Filename :
misc.py
back
Copy
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Backports for individual classes and functions.""" import os import sys __all__ = ['cache_from_source', 'callable', 'fsencode'] try: from imp import cache_from_source except ImportError: def cache_from_source(py_file, debug=__debug__): ext = debug and 'c' or 'o' return py_file + ext try: callable = callable except NameError: from collections import Callable def callable(obj): return isinstance(obj, Callable) try: fsencode = os.fsencode except AttributeError: def fsencode(filename): if isinstance(filename, bytes): return filename elif isinstance(filename, str): return filename.encode(sys.getfilesystemencoding()) else: raise TypeError("expect bytes or str, not %s" % type(filename).__name__)
Name
Size
Last Modified
Owner
Permissions
Actions
__pycache__
Dir
May 29 2024 3:41:22
root
0755
__init__.py
0.268
KB
April 06 2024 1:40:45
root
0644
misc.py
0.948
KB
April 06 2024 1:40:45
root
0644
sysconfig.cfg
2.556
KB
April 06 2024 1:40:45
root
0644
sysconfig.py
26.323
KB
April 06 2024 1:40:45
root
0644
2017 © D7net | D704T team