OXIESEC PANEL
- Current Dir:
/
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
mako
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
09/05/2025 09:34:06 AM
rwxr-xr-x
📄
__init__.py
242 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📁
__pycache__
-
02/07/2025 10:01:51 PM
rwxr-xr-x
📄
_ast_util.py
19.77 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
ast.py
6.49 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
cache.py
7.5 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
cmd.py
2.75 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
codegen.py
46.2 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
compat.py
1.87 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
exceptions.py
12.24 KB
12/18/2024 10:23:16 AM
rw-r--r--
📁
ext
-
02/07/2025 10:01:31 PM
rwxr-xr-x
📄
filters.py
4.55 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
lexer.py
15.61 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
lookup.py
12.14 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
parsetree.py
18.56 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
pygen.py
10.17 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
pyparser.py
6.87 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
runtime.py
27.15 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
template.py
23.3 KB
12/18/2024 10:23:16 AM
rw-r--r--
📁
testing
-
02/07/2025 10:01:31 PM
rwxr-xr-x
📄
util.py
10.39 KB
12/18/2024 10:23:16 AM
rw-r--r--
Editing: compat.py
Close
# mako/compat.py # Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import collections from importlib import util import inspect import sys win32 = sys.platform.startswith("win") pypy = hasattr(sys, "pypy_version_info") py38 = sys.version_info >= (3, 8) ArgSpec = collections.namedtuple( "ArgSpec", ["args", "varargs", "keywords", "defaults"] ) def inspect_getargspec(func): """getargspec based on fully vendored getfullargspec from Python 3.3.""" if inspect.ismethod(func): func = func.__func__ if not inspect.isfunction(func): raise TypeError(f"{func!r} is not a Python function") co = func.__code__ if not inspect.iscode(co): raise TypeError(f"{co!r} is not a code object") nargs = co.co_argcount names = co.co_varnames nkwargs = co.co_kwonlyargcount args = list(names[:nargs]) nargs += nkwargs varargs = None if co.co_flags & inspect.CO_VARARGS: varargs = co.co_varnames[nargs] nargs = nargs + 1 varkw = None if co.co_flags & inspect.CO_VARKEYWORDS: varkw = co.co_varnames[nargs] return ArgSpec(args, varargs, varkw, func.__defaults__) def load_module(module_id, path): spec = util.spec_from_file_location(module_id, path) module = util.module_from_spec(spec) spec.loader.exec_module(module) return module def exception_as(): return sys.exc_info()[1] def exception_name(exc): return exc.__class__.__name__ if py38: from importlib import metadata as importlib_metadata else: import importlib_metadata # noqa def importlib_metadata_get(group): ep = importlib_metadata.entry_points() if hasattr(ep, "select"): return ep.select(group=group) else: return ep.get(group, ())