Adding upstream version 3.0.30.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b6d29f411e
commit
635a85607c
35 changed files with 212 additions and 195 deletions
|
@ -6,6 +6,8 @@ Thanks to Vincent Michel for this!
|
|||
https://gist.github.com/vxgmichel/7685685b3e5ead04ada4a3ba75a48eef
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import pathlib
|
||||
|
||||
|
@ -15,7 +17,7 @@ from prompt_toolkit.contrib.ssh.server import (
|
|||
PromptToolkitSSHServer,
|
||||
PromptToolkitSSHSession,
|
||||
)
|
||||
from prompt_toolkit.contrib.telnet.server import TelnetServer
|
||||
from prompt_toolkit.contrib.telnet.server import TelnetConnection, TelnetServer
|
||||
|
||||
from ptpython.repl import embed
|
||||
|
||||
|
@ -28,7 +30,7 @@ def ensure_key(filename: str = "ssh_host_key") -> str:
|
|||
return str(path)
|
||||
|
||||
|
||||
async def interact(connection: PromptToolkitSSHSession) -> None:
|
||||
async def interact(connection: PromptToolkitSSHSession | TelnetConnection) -> None:
|
||||
global_dict = {**globals(), "print": print_formatted_text}
|
||||
await embed(return_asyncio_coroutine=True, globals=global_dict)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue