Skip to main content

abstract_gui is a python module for creating abstract GUI windows and interacting with them. It uses the PySimpleGUI library and provides additional utilities for simplifying the creation and handling of PySimpleGUI windows.

Project description

abstract_gui

This is a Python module for creating abstract GUI windows and interacting with them. It uses the PySimpleGUI library and provides additional utilities for simplifying the creation and handling of PySimpleGUI windows.

This module can be found in the abstract_essentials project at github.io/abstract_endeavors/abstract_essentials/abstract_gui/.

Installation

You can install the abstract_gui module via pip:

pip install abstract_gui

You can also install it directly from the source:

git clone https://github.io/abstract_endeavors/abstract_essentials/abstract_gui/
cd abstract_gui
python setup.py install

Usage

Here's an example of how to use the abstract_gui module:

from abstract_gui import get_window, while_basic

window = get_window(title="Hello World!", layout=[[sg.Text("Hello, world!")]])
while_basic(window)

This will create a simple window with a single "Hello, world!" text element, and handle its events until it's closed.

Documentation

The abstract_gui module provides the following classes and functions:

expandable(size: tuple = (None, None))

Returns a dictionary with window parameters for creating an expandable PySimpleGUI window.

get_glob(obj: str = '', glob=globals())

Retrieves a global object by name from the global namespace.

get_window(title: str = 'basic window', layout: list = [[]])

Returns a callable object for creating a PySimpleGUI window with the specified title and layout.

verify_window(win: any = None) -> bool

Verifies if the given object is a valid PySimpleGUI window.

close_window(win: any = None)

Closes the given PySimpleGUI window.

get_gui_fun(name: str = '', args: dict = {})

Returns a callable object for a specific PySimpleGUI function with the provided arguments.

win_closed(event: str = '')

Checks if the event corresponds to a closed window.

T_or_F_obj_eq(event: any = '', obj: any = '')

Compares two objects and returns True if they are equal, False otherwise.

det_bool_T(obj: (tuple or list or bool) = False)

Determines if the given object is a boolean True value.

det_bool_F(obj: (tuple or list or bool) = False)

Determines if the given object is a boolean False value.

out_of_bounds(upper: (int or float) = 100, lower: (int or float) = 0, obj: (int or float) = -1)

Checks if the given object is out of the specified upper and lower bounds.

... and many more!

Please refer to the source code for the complete list of classes and functions provided by the module, as well as their detailed documentation.

Contributing

Contributions are welcome! Please fork this repository and open a pull request to add snippets, make grammar tweaks, etc.

Contact

If you have any questions, feel free to reach out to us at partners@abstractendeavors.com.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Authors

  • putkoff - main developer

This README file was last updated on May 29, 2023.

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

abstract_gui-0.0.50.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

abstract_gui-0.0.50.1-py3.11.egg (23.4 kB view details)

Uploaded Egg

abstract_gui-0.0.50.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file abstract_gui-0.0.50.1.tar.gz.

File metadata

  • Download URL: abstract_gui-0.0.50.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for abstract_gui-0.0.50.1.tar.gz
Algorithm Hash digest
SHA256 3104602861bccf1a7f0c7765d7ef18a20f4219ec7573293443da30ed5e511dc8
MD5 d071941e4687682ac5085c3a3def6232
BLAKE2b-256 caf9e4b4be28f38108f5b567b0f60da0865ef327d0ee020fc27c46cb8733c8c2

See more details on using hashes here.

File details

Details for the file abstract_gui-0.0.50.1-py3.11.egg.

File metadata

  • Download URL: abstract_gui-0.0.50.1-py3.11.egg
  • Upload date:
  • Size: 23.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for abstract_gui-0.0.50.1-py3.11.egg
Algorithm Hash digest
SHA256 8e3564a694a05b343a8681a3acd0ca372a59685d811760c2d83e182399fe5bc0
MD5 0b775ba10fcd449424e9b354208bf097
BLAKE2b-256 361e69830a659b5f9acd058ebc993198a6ac70376ac54f734a760dfd9eee365f

See more details on using hashes here.

File details

Details for the file abstract_gui-0.0.50.1-py3-none-any.whl.

File metadata

File hashes

Hashes for abstract_gui-0.0.50.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f725213bc02cb5541c80e81167c5577b8e88dd4c2696d62c501bd034013541f1
MD5 9da345a313e8039d4bbcc2a48f34384e
BLAKE2b-256 d237fe23a00cc7881e6aba310569265c2393e7d33e08a7db1f4d45081e46ac3c

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