Skip to main content

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!

pygtk_form examples

Install the module with:

pip install pygtk_form

Read the documentation please!

In addition, it takes time to write ... The documentation in question

Example

pygtk_form examples

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


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.2.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file pygtk-form-0.0.2.tar.gz.

File metadata

  • Download URL: pygtk-form-0.0.2.tar.gz
  • Upload date:
  • Size: 7.4 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

Hashes for pygtk-form-0.0.2.tar.gz
Algorithm Hash digest
SHA256 de032ae3260bce32bc03a40453a09a248ca2b0feb469728f329fac95a240d6d5
MD5 d81d4930b6d5bf7ee66a90267e98fbf3
BLAKE2b-256 37898a36a5d25aaf5cb41db52db5867f7aae88cccd395bd15d1b5c69b40da2a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page