Skip to main content

TerminalButtons

Python curses made easy

Clicable Buttons in Linux terminal, Termux, etc

Captura de Tela 2021-08-15 às 08 03 05

Example:

from TerminalButtons import *
import curses

def example(std):
    Tb = TerminalButtons(std)
    Tb.CreateButton(positiony=CENTER,positionx=CENTER,fg=curses.COLOR_BLUE,text='hi')
    Tb.mainLoop()

curses.wrapper(example)

Methods:

CreateButton(self,positionx,positiony,fg,bg,commmand,text,row,col,typeText)
#positions = Top,Left,Bottom,Right
#fg,bg = curses COLOR (Foreground,Background Color)
#command = Function to run when click the button (without '()')
#row,col = padding
#typeText = curses BOLD,ITALIC,etc

ReqInput(self,x,y)
#x,y = coords where input will show up
#returns the string typed

AddKeyEvent(self,key,func)
#key = curses KEY
#func = Function to run when event fire

ConfigureBg(self,bg,fg)
#bg,fg = curses COLOR (will change the screen colors)

mainLoop(self)
#principal loop

ClearScreen(self)
#i need to document this?

GetMaxYX(self)
#returns the char size of terminal (x,y)

Exit(self)
#breaks the mainLoop and exit

Metadata

Release files for TerminalButtons 1.0.0

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

Source distribution (sdist)

Source distribution for TerminalButtons 1.0.0
File Size Uploaded Provenance
TerminalButtons-1.0.0.tar.gz 3.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 6.6 kB

Release files / TerminalButtons-1.0.0.tar.gz

Download URL TerminalButtons-1.0.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e5be4330007716cccdcda246e347022e53daed69f33eb68769ad6e0313f7803d
BLAKE2b-256 checksum
How to use checksums
4fef3cfd0b4ef79834620a9fb898c78aa432f061288c4a6f98cc408b4cd3dc83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release files / TerminalButtons-1.0.0-py3-none-any.whl

Download URL TerminalButtons-1.0.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2656d0fed261938e05412bffad13b810491ea50072f672b3fe45a6b9db269b74
BLAKE2b-256 checksum
How to use checksums
4a1a61f23ef70659b4101708ef987942e583bfecb1b3c379e57a38a6afd92895
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Security for TerminalButtons 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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