OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
wheel
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/17/2025 09:32:20 AM
rwxr-xr-x
📄
__init__.py
96 bytes
09/10/2017 09:52:41 PM
rw-r--r--
📄
__main__.py
419 bytes
07/26/2017 12:20:11 AM
rw-r--r--
📁
__pycache__
-
05/09/2024 06:58:00 AM
rwxr-xr-x
📄
archive.py
2.32 KB
07/29/2017 04:05:11 PM
rw-r--r--
📄
bdist_wheel.py
18.41 KB
08/06/2017 10:02:13 AM
rw-r--r--
📄
decorator.py
541 bytes
07/25/2017 09:21:00 PM
rw-r--r--
📄
egg2wheel.py
2.97 KB
07/26/2017 12:20:11 AM
rw-r--r--
📄
install.py
18 KB
01/23/2023 10:46:47 AM
rw-r--r--
📄
metadata.py
11.29 KB
07/29/2017 04:17:38 PM
rw-r--r--
📄
paths.py
1.1 KB
07/26/2017 12:20:11 AM
rw-r--r--
📄
pep425tags.py
5.63 KB
09/03/2017 02:03:28 PM
rw-r--r--
📄
pkginfo.py
1.23 KB
07/29/2017 03:48:00 PM
rw-r--r--
📁
signatures
-
05/09/2024 06:58:00 AM
rwxr-xr-x
📁
tool
-
05/09/2024 06:58:00 AM
rwxr-xr-x
📄
util.py
4.62 KB
08/06/2017 01:25:31 PM
rw-r--r--
📄
wininst2wheel.py
7.59 KB
07/26/2017 12:20:11 AM
rw-r--r--
Editing: pkginfo.py
Close
"""Tools for reading and writing PKG-INFO / METADATA without caring about the encoding.""" from email.parser import Parser try: unicode _PY3 = False except NameError: _PY3 = True if not _PY3: from email.generator import Generator def read_pkg_info_bytes(bytestr): return Parser().parsestr(bytestr) def read_pkg_info(path): with open(path, "r") as headers: message = Parser().parse(headers) return message def write_pkg_info(path, message): with open(path, 'w') as metadata: Generator(metadata, mangle_from_=False, maxheaderlen=0).flatten(message) else: from email.generator import BytesGenerator def read_pkg_info_bytes(bytestr): headers = bytestr.decode(encoding="ascii", errors="surrogateescape") message = Parser().parsestr(headers) return message def read_pkg_info(path): with open(path, "r", encoding="ascii", errors="surrogateescape") as headers: message = Parser().parse(headers) return message def write_pkg_info(path, message): with open(path, "wb") as out: BytesGenerator(out, mangle_from_=False, maxheaderlen=0).flatten(message)