Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python gui

# requires pip install easygui
import easygui as eg

# Ok msgbox
eg.msgbox(msg="hi", title="msgbox example")

# open file dialog
filename = eg.fileopenbox()
print(filename)

# save file dialog
filename = eg.filesavebox()
print(filename)

# single select choice
choice = eg.choicebox(msg="Select an item", title="colors", choices=["red", "blue", "green"])
print(choice)

# multiple select choice returns a list of items
choices = eg.multchoicebox(msg="Select an item", title="colors", choices=["red", "blue", "green"])
print(choices)

# inputbox
name = eg.enterbox(msg="What is your name?")
print(name)

# yes no input box - returns true if yes false if no
yes_no = eg.ynbox(msg="select yes or not", title="yes no example")
print(yes_no)

# password input box
password = eg.passwordbox(msg="Enter your password", title='password example')
print(password)

# easygui demo
eg.egdemo()
Comment

python gui

import tkinter as tk
#Importing the main module
window = tk.Tk()
window.mainloop()
Comment

create gui python

'''
Different modules exists, from the simpliest to the most complete.
By order I would (subjectively) recommand
- Tkinter | simple, allows to do small board games. Quite good
          | to begin with GUIs
          
- pysimplegui | a little bit more complete, allows to manipulate more
              | easily events, objects and layout
              
- PyQt5 | One the most complete. Using the Qt technology, this allows
        | to build complex and conventionnal GUI. Quite hard to master
        | requires to be at ease with classes, layouts and events
'''
Comment

easy python gui

>>> import easygui
>>> easygui.ynbox('Shall I continue?', 'Title', ('Yes', 'No'))
1
>>> easygui.msgbox('This is a basic message box.', 'Title Goes Here')
'OK'
>>> easygui.buttonbox('Click on your favorite flavor.', 'Favorite Flavor', ('Chocolate', 'Vanilla', 'Strawberry'))
'Chocolate'
Comment

PREVIOUS NEXT
Code Example
Python :: map in python 
Python :: hiw ti count the number of a certain value in python 
Python :: Amazing Trees with python turtle 
Python :: py environment variables register in flask 
Python :: h2o dataframe columns drop 
Python :: subprocess the system cannot find the file specifie 
Python :: one function in numpy array 
Python :: fonts in python 
Python :: python wifi moudel [WinError 2] The system cannot find the file specified 
Python :: how to loop through every character in a string 
Python :: python ordered indexs of a list 
Python :: format exponentials python 
Python :: python remove table widget numbers 
Python :: numpy sort multidimensional array 
Python :: python string [::-1] 
Python :: string remove ,replace, length in python 
Python :: pascal triangle 
Python :: find difference between two pandas dataframes 
Python :: merge two dict python 
Python :: how draw shell in python 
Python :: from sklearn.metrics import confusion_matrix pred = model.predict(X_test) pred = np.argmax(pred,axis = 1) y_true = np.argmax(y_test,axis = 1) 
Python :: check pd.NaT python 
Python :: pandas if nan, then the row above 
Python :: do while python using dates 
Python :: python one line key increment or add 
Python :: sklearn tree visualization 
Python :: Align axis labels in subplots 
Python :: import tkinter module in python file 
Python :: python get ids from array of objects 
Python :: ocaml returns the last element of a list 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =