How to use the terminado.management.PtyWithClients 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 / term_manager.py View on Github external
"""Term manager."""
import os
import time
import signal
import hashlib
import tornado.web
import tornado.gen
import tornado.ioloop
from terminado.management import TermManagerBase, PtyWithClients
from urllib.parse import unquote

WINDOWS = os.name == 'nt'


class PtyReader(PtyWithClients):
    """Wrapper around PtyWithClients."""

    def resize_to_smallest(self, rows, cols):
        """Set the terminal size to that of the smallest client dimensions.

        A terminal not using the full space available is much nicer than a
        terminal trying to use more than the available space, so we keep it
        sized to the smallest client.
        """
        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:

terminado

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

BSD-2-Clause
Latest version published 9 months ago

Package Health Score

86 / 100
Full package analysis

Similar packages