GUI-generator enables quick and interactive interfaces for testing functions without requiring to build a full-fledged GUI.
Project description
The GUI-generator Python module enables quick and interactive interfaces for testing functions without requiring to build a full-fledged GUI.
It can be installed using the pip package manager (pip install gui-generator). To generate a GUI window, we only need to provide a function for the program to execute and, if it takes any parameters, specify their descriptions that will display next to the input fields. They have to be entered in the same order as the function’s parameters. We can also provide an additional description that will display at the top of the window by adding the desc parameter. After the user enters the values and clicks “Confirm,” the given function will execute. The value it returns is displayed in a new window.
The addInput() method creates a separate window at runtime for collecting additional input. It can take an argument with a description that will display next to the input field.
Usage
from gui_generator import *
def Average(n):
s = 0
for x in range(n):
s += int(g.addInput("Enter a value:"))
return s / n
g = GUIgenerator()
g.create(Average, args=["How many numbers:"], desc="Calculate the average value.")
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
File details
Details for the file gui_generator-2.0.1.tar.gz.
File metadata
- Download URL: gui_generator-2.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abf0f01ba2e9268b390633756ed054d57c8b092f02e3b36341f359232b6f5c58
|
|
| MD5 |
dbde3b4af30dddc125a04696bd55ca36
|
|
| BLAKE2b-256 |
aa8d7fb97a2f5d0a7d09c584044d270dfc250923fee7f688c6e3b3af22b9fea3
|