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.1.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.1.tar.gz.
File metadata
- Download URL: tkurses-0.2.1.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 |
c61f6c2a33ec0bd7bc7fe9df86533835c172fb5586b3fa6cd8f26b7c970d3e43
|
|
| MD5 |
d9aef9e693199ed5c4568cc99695c7f5
|
|
| BLAKE2b-256 |
ac5059a29873189cda0c0fd18ba6f7b6987cc794fb84d9e4f330eae1cf33d3f6
|
File details
Details for the file tkurses-0.2.1-py3-none-any.whl.
File metadata
- Download URL: tkurses-0.2.1-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 |
928a0ae383f59162091a5916a33bd8e7ed5a492f0911038202cbe81596f218a9
|
|
| MD5 |
ea8b3b62229b96386bb7bfe4cb3920f6
|
|
| BLAKE2b-256 |
aab49ddd1ac4db05ce12045cd0ad09cf0c2931140bb8b3596478282acf722f45
|