/Basic-GUI-API

Add GUI to python scripts easily

Primary LanguagePython

Basic-GUI-API

Description:

A basic and intuitive API that allows turning a command-line-script to basic form-like-GUI with a few lines of code.

Includes in-code documentation [e.g. by help(FormGUI)].

Example:

Code:

from GUI_API import FormGUI

# Initiates a GUI App instance with 'action_func' (the lambda function) and output in pop-up-message 
app = FormGUI(lambda x,operator,y : eval(x+operator+y), output_type='messagebox', title="Basic Calculator")

# Sets the fields, i.e. the arguments of 'action_func'
app.setField('x', 'entry', label = 'Variable X')
app.setField('operator', 'combobox',values = ['+','-','*','/','**'])
app.setField('y', 'entry', label = 'Variable Y')

# Opens the GUI App
app.run()

Result: