OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
hps
/
bfaces
/
.venv
/
lib
/
python3.10
/
site-packages
/
pip
/
_internal
/
cli
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/24/2024 01:43:15 PM
rwxr-xr-x
📄
__init__.py
132 bytes
10/24/2024 01:43:12 PM
rw-r--r--
📁
__pycache__
-
10/24/2024 01:44:40 PM
rwxr-xr-x
📄
autocompletion.py
6.52 KB
10/24/2024 01:43:11 PM
rw-r--r--
📄
base_command.py
7.66 KB
10/24/2024 01:43:11 PM
rw-r--r--
📄
cmdoptions.py
28.81 KB
10/24/2024 01:43:11 PM
rw-r--r--
📄
command_context.py
774 bytes
10/24/2024 01:43:11 PM
rw-r--r--
📄
main.py
2.41 KB
10/24/2024 01:43:11 PM
rw-r--r--
📄
main_parser.py
4.24 KB
10/24/2024 01:43:11 PM
rw-r--r--
📄
parser.py
10.56 KB
10/24/2024 01:43:12 PM
rw-r--r--
📄
progress_bars.py
1.92 KB
10/24/2024 01:43:12 PM
rw-r--r--
📄
req_command.py
17.75 KB
10/24/2024 01:43:12 PM
rw-r--r--
📄
spinners.py
5 KB
10/24/2024 01:43:12 PM
rw-r--r--
📄
status_codes.py
116 bytes
10/24/2024 01:43:12 PM
rw-r--r--
Editing: command_context.py
Close
from contextlib import ExitStack, contextmanager from typing import ContextManager, Generator, TypeVar _T = TypeVar("_T", covariant=True) class CommandContextMixIn: def __init__(self) -> None: super().__init__() self._in_main_context = False self._main_context = ExitStack() @contextmanager def main_context(self) -> Generator[None, None, None]: assert not self._in_main_context self._in_main_context = True try: with self._main_context: yield finally: self._in_main_context = False def enter_context(self, context_provider: ContextManager[_T]) -> _T: assert self._in_main_context return self._main_context.enter_context(context_provider)