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)
Metadata
Release files for pygtk-form 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pygtk-form-0.0.3.tar.gz | 7.5 kB | Details |
Release files / pygtk-form-0.0.3.tar.gz
| Download URL | pygtk-form-0.0.3.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ef1daa489e10844bb68260b799659d4c7be3de38643ad5374cd624aa306f6f1
|
|
BLAKE2b-256 checksum How to use checksums |
3b74a707d40e4d55a3e564a1fbaa2b841b85eb593fe7abf19df78c71a9d203ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|