Library for TUI programs on basis of curses
Project description
cursedspace
A python library/framework for TUI application on the basis of the curses package.
Example use
Here’s a very simple example of how to use the cursedspace package:
#!/usr/bin/env python3
from cursedspace import Application, Key, Panel
class DemoApplication(Application):
def __init__(self):
super().__init__()
self.panel = None
def main(self):
self.panel = Panel(self)
self.resize()
while True:
curses.doupdate()
key = self.read_key()
if key == Key.RESIZE:
self.resize()
elif key in [Key.ESCAPE, "q", "^C"]:
break
def resize(self):
height, width = self.size()
self.panel.resize(height, width)
self.panel.paint()
Components
Applicationis the main application class and provides boilerplate initialisationsPanelis a basic panel with support for borders and key handling in the context of anApplicationLineInputis a panel with very basic editing support.Keyprovides a convenient wrapper around curses’ key system. It can be used standalone even when you don’t want to useApplicationorPanel.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cursedspace-0.1.0.tar.gz
(10.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cursedspace-0.1.0.tar.gz.
File metadata
- Download URL: cursedspace-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using 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.62.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a52f5a010412873e99b3c50fc1f76f8a136b792d1decf9e78e54339af72c6a41
|
|
| MD5 |
ff1e9f5f06a0d947d9be4d08cb7d8a49
|
|
| BLAKE2b-256 |
d00a0e21d9e12c446763d936f84661ed129c9ceb07efe64b71c7298dafd86755
|
File details
Details for the file cursedspace-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cursedspace-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using 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.62.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1661539a334a32e6deaf0496c3d1b614005d0d666c08c9360a8eea6fce4cd8a4
|
|
| MD5 |
b73baff6f6092334bb268c91bfb57d99
|
|
| BLAKE2b-256 |
0cd410b78ea327a4405169ff5bbf4129a99711659294b7af180178c9895ba0d3
|