Create forms very easily for your scripts with GTK !
Project description
PYGTK FORM
Create forms very easily for your scripts with GTK ! Just call a function, with the data you want to recover, and a callback!
Install the module with:
pip install pygtk_form
Read the documentation please!
In addition, it takes time to write ... The documentation in question
Example
And here is the (very simple code) !
import pygtk_form
def say_hello(data):
if data:
print("Hello " + data["pseudo"] + ", I know you are using " + data["distribution"] + "!")
else:
print("Ho no ... You canceled ...")
pygtk_form.spawn_form({
"title": "Cool form",
"default_size": [400, 300],
"theme": "windows_light",
"resizable": True,
"fields": [
{
"id": "pseudo",
"type": "text",
"text": "",
"label": "Your username",
"max_length": 255
},
{
"id": "distribution",
"type": "combobox",
"label": "What distribution do you use ?",
"default": "manjaro",
"items": [
{"id": "fedora", "name": "Fedora"},
{"id": "ubuntu", "name": "Ubuntu"},
{"id": "debian", "name": "Debian"},
{"id": "manjaro", "name": "Manjaro"},
{"id": "arch", "name": "Arch (BTW)"}
]
}
]
}, say_hello)
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
pygtk-form-0.0.3.tar.gz
(7.5 kB
view details)
File details
Details for the file pygtk-form-0.0.3.tar.gz.
File metadata
- Download URL: pygtk-form-0.0.3.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ef1daa489e10844bb68260b799659d4c7be3de38643ad5374cd624aa306f6f1
|
|
| MD5 |
b466006d0993b7b4e0aeb3b2ce6fb9c4
|
|
| BLAKE2b-256 |
3b74a707d40e4d55a3e564a1fbaa2b841b85eb593fe7abf19df78c71a9d203ff
|