Skip to main content

Manyterm

PyPI - Version PyPI - Downloads Donate
Spawn multiple terminals to print to (or get input from).
Or share terminals between python programs.
Compatible with Windows, Linux, and MacOS.

Installation

pip install manyterm or pip3 install manyterm

Usage

import manyterm 

t1 = manyterm.Terminal() # make a new window

t1.print("Hello World") # print to the window

t1.print("supercalifragilisticexpialidocious", end="") # default end="\n"

t1.close() # close the window

To use a shared terminal, see demos/shared.py

Description

There are two types of terminals that can be made:

  1. One to Many manyterm.Terminal():
  • New terminals can printed to or be asked for input.
  • tests/print.py is an example of how to use printing.
  • tests/input.py is an example of how to use input.
  1. Many to One manyterm.SharedTerminal():
  • Create a "shared" terminal that can be accessed from many independent python programs.
  • Run several instances of tests/shared.py concurrently to share one terminal.
  • Each instance will connect to the terminal based on the uid.
  • Then run tests/close_shared.py to close the terminal.

Notes:

  • Terminals are probably not thread safe.
  • No errors will be thrown if trying to print to a closed terminal, however you can check the boolean return of print to see if it was successful.
  • The title of the window can be changed in Linux with the title parameter.
  • The size of the window can be changed in Linux and Windows with the cols and rows parameter, unit is characters.
  • On Linux the terminal can be changed with the terminal parameter, manyterm supports gnome, kde / konsole, kitty, and alacritty.

How it works:

A server is used to print to client windows based on a uuid. When a new window object is made manyterm.Terminal() the program checks to make sure that the server is running, assigns itself a uuid, and then the program calls itself from a new terminal using the uuid as an argument. The new program contacts the server with its' uuid and the connection is made. For "Many to One" the window becomes the server and the user program becomes the client.

Windows 11

Picture showing windows example

Linux (Mint 22.1)

Picture showing windows example

MacOS Sonoma

Picture showing windows example

Metadata

Release files for manyterm 2.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for manyterm 2.1.2
File Size Uploaded
manyterm-2.1.2.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for manyterm 2.1.2
File Interpreter ABI Platform
manyterm-2.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 kB

Release files / manyterm-2.1.2.tar.gz

Download URL manyterm-2.1.2.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
84949617b21fffdf11368774e6371b3a8b8505d063456fa67558278c6aba6817
BLAKE2b-256 checksum
How to use checksums
e7e771c40480a79c966d351375b70a48cf7779d7213b7cdc2599ec4765b52eb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / manyterm-2.1.2-py3-none-any.whl

Download URL manyterm-2.1.2-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c48ce2c51c80962aaeaf065fcad652c36a74e3b3e7cfdda5e8424e6a27b53e67
BLAKE2b-256 checksum
How to use checksums
bd9c784bc21ac5f545bfc57786399478626730bb7fcb4a71b5735660ff087353
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

2.1.2 This release

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page