Skip to main content

Terminal Widgets.

Project description

Twidge

Simple terminal widgets for simple people.

This package is mostly intended for my own personal use, but have at it.

Quick Start

Install

python -m pip install twidge

CLI

# Echo keypresses
python -m twidge echo

# ... as bytes
python -m twidge echobytes

# Edit text
python -m twidge edit 'Hello World'

# Form input
python -m twidge form name,email,username,password

# Template input
python -m twidge template "Hello, my name is {name} and I live in {town}. I prefer {language:('Python', 'JavaScript')}"

Python

from twidge.widgets import *

# Echo keypresses
Echo().run()

# ... as bytes
EchoBytes().run()

# Edit strings
content = Close(EditString('Hello World!')).run()

# Form input
user_info = Close(Form(['Name', 'EMail', 'Username', 'Password'])).run()

# Template input
result = Close(EditTemplate("Hello, my name is {name} and I live in {town}. I prefer {language:('Python', 'JavaScript')}")).run()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twidge-1.2.1.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

twidge-1.2.1-py3-none-any.whl (16.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page