Skip to content
JohnConnorNPCPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

XTerm-Py

A Python port of xterm.js using Sanic for web-based terminal emulation.

Overview

XTerm-Py is a comprehensive Python implementation of the popular xterm.js terminal emulator, designed to work with the Sanic async web framework. It provides a full-featured terminal emulator that can be embedded in web applications.

Example Integration: image

Features

  • Full terminal emulation with ANSI escape sequence support
  • WebSocket-based communication
  • PTY (pseudo-terminal) support
  • Buffer management with scrollback
  • Input handling and keyboard events
  • Color and styling support
  • Unicode support
  • Async/await architecture

Installation

pip install xterm-py

Quick Start

from sanic import Sanic
from xterm_py import create_terminal_app

app = create_terminal_app()

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8000)

Architecture

The project maintains the same modular architecture as xterm.js:

  • browser/: Browser-specific implementations (WebSocket handlers, etc.)
  • common/: Platform-agnostic terminal core functionality
  • headless/: Headless terminal implementation

License

MIT License (same as xterm.js)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages