Tkinter-like themed UI framework for curses... New aditions to 0.2.5: default theme file if theme=None
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.5.tar.gz
(6.3 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.5.tar.gz.
File metadata
- Download URL: tkurses-0.2.5.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c7c6694b36535054f6257ff0252eda8fe061f052300cc42033e40df2ed3c085
|
|
| MD5 |
33e86c703bd9e08d87a65e1ee35f6e9c
|
|
| BLAKE2b-256 |
3f09e3b120107605eee77084e19f73890207d3f08abe1f4aa6e179c5d59ff7e4
|
File details
Details for the file tkurses-0.2.5-py3-none-any.whl.
File metadata
- Download URL: tkurses-0.2.5-py3-none-any.whl
- Upload date:
- Size: 8.3 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 |
f9fd6e1421daf7a04b128422e55efa032deaba015221aada60030920bbdc9181
|
|
| MD5 |
1d082f109c65435266c4d711982d6112
|
|
| BLAKE2b-256 |
18cbdd6ccc4cb03565825f32069a96a950e440a2f9a10806d2a4f789837e093a
|