Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
Python-3.10.14 /
Doc /
tools /
extensions /
Delete
Unzip
Name
Size
Permission
Date
Action
asdl_highlight.py
1.45
KB
-rw-r--r--
2024-03-19 22:46
c_annotations.py
7.52
KB
-rw-r--r--
2024-03-19 22:46
escape4chm.py
1.78
KB
-rw-r--r--
2024-03-19 22:46
glossary_search.py
1.61
KB
-rw-r--r--
2024-03-19 22:46
patchlevel.py
1.91
KB
-rw-r--r--
2024-03-19 22:46
peg_highlight.py
2.74
KB
-rw-r--r--
2024-03-19 22:46
pyspecific.py
22.49
KB
-rw-r--r--
2024-03-19 22:46
suspicious.py
8.36
KB
-rw-r--r--
2024-03-19 22:46
Save
Rename
""" Escape the `body` part of .chm source file to 7-bit ASCII, to fix visual effect on some MBCS Windows systems. https://bugs.python.org/issue32174 """ import pathlib import re from html.entities import codepoint2name from sphinx.util.logging import getLogger # escape the characters which codepoint > 0x7F def _process(string): def escape(matchobj): codepoint = ord(matchobj.group(0)) name = codepoint2name.get(codepoint) if name is None: return '&#%d;' % codepoint else: return '&%s;' % name return re.sub(r'[^\x00-\x7F]', escape, string) def escape_for_chm(app, pagename, templatename, context, doctree): # only works for .chm output if getattr(app.builder, 'name', '') != 'htmlhelp': return # escape the `body` part to 7-bit ASCII body = context.get('body') if body is not None: context['body'] = _process(body) def fixup_keywords(app, exception): # only works for .chm output if getattr(app.builder, 'name', '') != 'htmlhelp' or exception: return getLogger(__name__).info('fixing HTML escapes in keywords file...') outdir = pathlib.Path(app.builder.outdir) outname = app.builder.config.htmlhelp_basename with open(outdir / (outname + '.hhk'), 'rb') as f: index = f.read() with open(outdir / (outname + '.hhk'), 'wb') as f: f.write(index.replace(b''', b''')) def setup(app): # `html-page-context` event emitted when the HTML builder has # created a context dictionary to render a template with. app.connect('html-page-context', escape_for_chm) # `build-finished` event emitted when all the files have been # output. app.connect('build-finished', fixup_keywords) return {'version': '1.0', 'parallel_read_safe': True}