OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
hps
/
faces
/
.venv
/
lib
/
python3.10
/
site-packages
/
numpy
/
distutils
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/26/2024 01:26:35 PM
rwxr-xr-x
📄
__config__.py
5.02 KB
10/26/2024 01:26:26 PM
rw-r--r--
📄
__init__.py
2.03 KB
10/26/2024 01:26:26 PM
rw-r--r--
📄
__init__.pyi
119 bytes
10/26/2024 01:26:26 PM
rw-r--r--
📁
__pycache__
-
10/26/2024 01:27:35 PM
rwxr-xr-x
📄
_shell_utils.py
2.55 KB
10/26/2024 01:26:26 PM
rw-r--r--
📄
armccompiler.py
962 bytes
10/26/2024 01:26:25 PM
rw-r--r--
📄
ccompiler.py
27.47 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
ccompiler_opt.py
97.69 KB
10/26/2024 01:26:25 PM
rw-r--r--
📁
checks
-
10/26/2024 01:27:32 PM
rwxr-xr-x
📁
command
-
10/26/2024 01:28:51 PM
rwxr-xr-x
📄
conv_template.py
9.31 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
core.py
7.98 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
cpuinfo.py
22.11 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
exec_command.py
10.04 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
extension.py
3.48 KB
10/26/2024 01:26:25 PM
rw-r--r--
📁
fcompiler
-
10/26/2024 01:28:52 PM
rwxr-xr-x
📄
from_template.py
7.73 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
intelccompiler.py
4.13 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
lib2def.py
3.54 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
line_endings.py
1.98 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
log.py
2.81 KB
10/26/2024 01:26:25 PM
rw-r--r--
📁
mingw
-
10/26/2024 01:27:34 PM
rwxr-xr-x
📄
mingw32ccompiler.py
21.56 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
misc_util.py
87.27 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
msvc9compiler.py
2.14 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
msvccompiler.py
2.58 KB
10/26/2024 01:26:25 PM
rw-r--r--
📄
npy_pkg_config.py
12.67 KB
10/26/2024 01:26:26 PM
rw-r--r--
📄
numpy_distribution.py
634 bytes
10/26/2024 01:26:26 PM
rw-r--r--
📄
pathccompiler.py
713 bytes
10/26/2024 01:26:26 PM
rw-r--r--
📄
setup.py
634 bytes
10/26/2024 01:26:26 PM
rw-r--r--
📄
system_info.py
108.43 KB
10/26/2024 01:26:26 PM
rw-r--r--
📁
tests
-
10/26/2024 01:28:52 PM
rwxr-xr-x
📄
unixccompiler.py
5.3 KB
10/26/2024 01:26:26 PM
rw-r--r--
Editing: _shell_utils.py
Close
""" Helper functions for interacting with the shell, and consuming shell-style parameters provided in config files. """ import os import shlex import subprocess try: from shlex import quote except ImportError: from pipes import quote __all__ = ['WindowsParser', 'PosixParser', 'NativeParser'] class CommandLineParser: """ An object that knows how to split and join command-line arguments. It must be true that ``argv == split(join(argv))`` for all ``argv``. The reverse neednt be true - `join(split(cmd))` may result in the addition or removal of unnecessary escaping. """ @staticmethod def join(argv): """ Join a list of arguments into a command line string """ raise NotImplementedError @staticmethod def split(cmd): """ Split a command line string into a list of arguments """ raise NotImplementedError class WindowsParser: """ The parsing behavior used by `subprocess.call("string")` on Windows, which matches the Microsoft C/C++ runtime. Note that this is _not_ the behavior of cmd. """ @staticmethod def join(argv): # note that list2cmdline is specific to the windows syntax return subprocess.list2cmdline(argv) @staticmethod def split(cmd): import ctypes # guarded import for systems without ctypes try: ctypes.windll except AttributeError: raise NotImplementedError # Windows has special parsing rules for the executable (no quotes), # that we do not care about - insert a dummy element if not cmd: return [] cmd = 'dummy ' + cmd CommandLineToArgvW = ctypes.windll.shell32.CommandLineToArgvW CommandLineToArgvW.restype = ctypes.POINTER(ctypes.c_wchar_p) CommandLineToArgvW.argtypes = (ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_int)) nargs = ctypes.c_int() lpargs = CommandLineToArgvW(cmd, ctypes.byref(nargs)) args = [lpargs[i] for i in range(nargs.value)] assert not ctypes.windll.kernel32.LocalFree(lpargs) # strip the element we inserted assert args[0] == "dummy" return args[1:] class PosixParser: """ The parsing behavior used by `subprocess.call("string", shell=True)` on Posix. """ @staticmethod def join(argv): return ' '.join(quote(arg) for arg in argv) @staticmethod def split(cmd): return shlex.split(cmd, posix=True) if os.name == 'nt': NativeParser = WindowsParser elif os.name == 'posix': NativeParser = PosixParser