Tkinter-like themed UI framework for curses
Project description
TKurses
tkurses is a library for tkinter like interface in curses
basic program
import curses
import tkurses.core as core
import tkurses.widgets as widgits
def main(stdscr):
app = core.App(screen, "theme.json")
app.addWidget(app.Label("Hello World!", 0,0))
app.main_loop()
curses.wrapper(main)
Widgets
Label
Declaring one
app.Label("what To Write",posX,posY)
Button
Declaring one
app.Button("what To Write",(posX,posY),(sizeX,sizeY),on_press=function_to_run)
Input prompt
declaring one
app.Input("prompt",(posX,posY),(sizeX,sizeY),on_press=function_to_run_on_enter_pressed)
TextBox (Experemental)
Declaring one
app.TextBox((PosX,posY),(sizeX,sizeY),enterOnEnter=true)
getting current Contents
currentTextbox.text
adding Widgets to app
app.add_widget(Variable)
Theming files
example Theme
{
"colors": {
"background": "black",
"forground": "white"
},
"input": {
"style": "default",
"colors": {
"focused": {
"background": "black",
"forground": "white"
}, "not-focused": {
"forground": "black",
"background": "white"
}
}
},
"text": {
"colors": {
"background": "blue",
"forground": "black"
},
"theme": "None",
"quitKeys": ["Enter","shift-enter"]
},
"buttons": {
"colors": {
"focused": { "background": "white", "forground": "black"},
"not-focused": {"background": "black","forground": "white"}
},
"start": {"focused":"[","not-focused":"<"},
"end": {"focused": "]","not-focused":">"}
}
}
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
tkurses-0.2.3.tar.gz
(1.7 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 tkurses-0.2.3.tar.gz.
File metadata
- Download URL: tkurses-0.2.3.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b1ee9ffc6ce1482736f172640ba95e147e3733e679b673be476b7052786cac4
|
|
| MD5 |
19085bce04ea39792cb66cedeff41d62
|
|
| BLAKE2b-256 |
30aea53e7cbb89d5706ec4c5b341c66e3fa3efbcd6ccc7fb05a642e566b4699e
|
File details
Details for the file tkurses-0.2.3-py3-none-any.whl.
File metadata
- Download URL: tkurses-0.2.3-py3-none-any.whl
- Upload date:
- Size: 1.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a742c90ccea1a2f9b9d702606046baea94bf819a11949858d6d147321ba46d3c
|
|
| MD5 |
541f76dd8a2d56ed4b07412fb1b6daba
|
|
| BLAKE2b-256 |
7fd4b276325b811fee0b2e467232a2eeec2917d864d80979b99eef0888aa0f83
|