__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import errno
import os
import sys
CAN_USE_PYREPL: bool
FAIL_REASON: str
try:
if sys.platform == "win32" and sys.getwindowsversion().build < 10586:
raise RuntimeError("Windows 10 TH2 or later required")
if not os.isatty(sys.stdin.fileno()):
raise OSError(errno.ENOTTY, "tty required", "stdin")
from .simple_interact import check
if err := check():
raise RuntimeError(err)
except Exception as e:
CAN_USE_PYREPL = False
FAIL_REASON = f"warning: can't use pyrepl: {e}"
else:
CAN_USE_PYREPL = True
FAIL_REASON = ""
def interactive_console(mainmodule=None, quiet=False, pythonstartup=False):
if not CAN_USE_PYREPL:
if not os.getenv('PYTHON_BASIC_REPL') and FAIL_REASON:
from .trace import trace
trace(FAIL_REASON)
print(FAIL_REASON, file=sys.stderr)
return sys._baserepl()
if mainmodule:
namespace = mainmodule.__dict__
else:
import __main__
namespace = __main__.__dict__
namespace.pop("__pyrepl_interactive_console", None)
# sys._baserepl() above does this internally, we do it here
startup_path = os.getenv("PYTHONSTARTUP")
if pythonstartup and startup_path:
sys.audit("cpython.run_startup", startup_path)
import tokenize
with tokenize.open(startup_path) as f:
startup_code = compile(f.read(), startup_path, "exec")
exec(startup_code, namespace)
# set sys.{ps1,ps2} just before invoking the interactive interpreter. This
# mimics what CPython does in pythonrun.c
if not hasattr(sys, "ps1"):
sys.ps1 = ">>> "
if not hasattr(sys, "ps2"):
sys.ps2 = "... "
from .console import InteractiveColoredConsole
from .simple_interact import run_multiline_interactive_console
console = InteractiveColoredConsole(namespace, filename="<stdin>")
run_multiline_interactive_console(console)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 925 B | 0644 |
|
| __main__.py | File | 263 B | 0644 |
|
| _minimal_curses.py | File | 1.8 KB | 0644 |
|
| _threading_handler.py | File | 2.12 KB | 0644 |
|
| commands.py | File | 11.91 KB | 0644 |
|
| completing_reader.py | File | 9.81 KB | 0644 |
|
| console.py | File | 6.71 KB | 0644 |
|
| curses.py | File | 1.21 KB | 0644 |
|
| fancy_termios.py | File | 2.11 KB | 0644 |
|
| historical_reader.py | File | 12.93 KB | 0644 |
|
| input.py | File | 3.69 KB | 0644 |
|
| keymap.py | File | 6.31 KB | 0644 |
|
| main.py | File | 1.89 KB | 0644 |
|
| mypy.ini | File | 870 B | 0644 |
|
| pager.py | File | 5.68 KB | 0644 |
|
| reader.py | File | 27.06 KB | 0644 |
|
| readline.py | File | 19.75 KB | 0644 |
|
| simple_interact.py | File | 5.15 KB | 0644 |
|
| trace.py | File | 433 B | 0644 |
|
| types.py | File | 354 B | 0644 |
|
| unix_console.py | File | 24.88 KB | 0644 |
|
| unix_eventqueue.py | File | 4.92 KB | 0644 |
|
| utils.py | File | 2.18 KB | 0644 |
|
| windows_console.py | File | 19.05 KB | 0644 |
|