How to use the function in terminado

To help you get started, we’ve selected a few terminado examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spyder-ide / spyder-terminal / spyder_terminal / server / logic / View on Github external
        minrows = mincols = 10001
        if rows is not None and rows < minrows:
            minrows = rows
        if cols is not None and cols < mincols:
            mincols = cols

        if minrows == 10001 or mincols == 10001:

        rows, cols = self.ptyproc.getwinsize()
        if (rows, cols) != (minrows, mincols):
            self.ptyproc.setwinsize(minrows, mincols)

class TermManager(TermManagerBase):
    """Wrapper around pexpect to execute local commands."""

    def __init__(self, shell_command, **kwargs):
        """Create a new terminal handler instance."""
        super().__init__(shell_command, **kwargs)
        self.consoles = {}

    def new_terminal(self, **options):
        """Make a new terminal, return a :class:`PtyReader` instance."""
        tty = super().new_terminal(**options)
        return PtyReader(tty.ptyproc)

    def client_disconnected(self, pid, socket):
        """Send terminal SIGHUP when client disconnects.""""Websocket closed, sending SIGHUP to terminal.")


Tornado websocket backend for the Xterm.js Javascript terminal emulator library.

Latest version published 10 months ago

Package Health Score

82 / 100
Full package analysis

Similar packages