How to use the easygui.fileopenbox function in easygui

To help you get started, we’ve selected a few easygui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kglore / llnet_color / llnet_color.py View on Github external
print '...loading completed'
            denoise_overlapped_strides(te_noisy_image);
            print 'Completed:', te_noisy_image
            exit()

    msg = "You are currently running the image enhancement program, LLNet, developed by Akintayo, Lore, and Sarkar. What would you like to do?"
    choices = ["Train Model","Enhance Single/Multiple Images","Exit Program"]
    reply = buttonbox(msg, title="Welcome to LLNet!", choices=choices)

    if reply == "Exit Program":
        exit()

    if reply == "Train Model":

        if ccbox('You are currently training a new model. The model file might be overwritten. Continue?','Information')==True:
            tr_dataset = fileopenbox(title='Select training data.',default='*',filetypes=["*.mat"])
            test_SdA()
        else:
            msgbox("Program terminated. Goodbye!")
            exit()

    if reply == "Enhance Single/Multiple Images":

        # Present model to load
        model_to_load = fileopenbox(title='Select your model to load.',default='*',filetypes=["*.wgt","*.obj"])
        #f = file(model_to_load, 'rb')
        #sda = cPickle.load(f)
        #f.close()
        print '...initializing SDA'
        sda = SdA(
            numpy_rng= numpy.random.RandomState(89677),
            n_ins=prod,
github realpython / python-basics-exercises / ch18-graphical-user-interfaces / 2-example-app-pdf-page-rotator.py View on Github external
# 18.2 - Example App: PDF Page Rotator
# Review Exercise #1

import easygui as gui
from PyPDF2 import PdfFileReader, PdfFileWriter


# Ask suser to select a PDF file
open_title = "Select a PDF to rotate..."
file_type = "*.pdf"
input_path = gui.fileopenbox(title=open_title, default=file_type)

# If nothing was returned by gui.fileopenbox(), the user either
# hit cancel or closed the window so we should exit the program.
if input_path is None:
    exit()

# Ask the user by how many degrees each page should be rotated.
# If the user dosn't select anything, keep displaying the
# buttonbox() element until they do.
choices = ("90", "180", "270")
message = "Rotate the PDF clockwise by how many degrees?"
degrees = None
while degrees is None:
    degrees = gui.buttonbox(message, "Choose rotation...", choices)

# Convert the chosen number of degrees to an integer
github vzat / comparing_images / differenceChecker.py View on Github external
file1Ver = False
file2Ver = False

while applicationSwitch:
    title = 'Difference Checker'
    instruction = 'Please load image 1 and 2 then begin.'

    if file1Ver == False or file2Ver == False:
        buttons = ['Load Image 1', 'Load Image 2']
    else:
        buttons = ['Load Image 1', 'Load Image 2', 'Begin Application']

    selection = easygui.indexbox(msg = instruction, title = title, choices = buttons)

    if selection == 0:
        file1 = easygui.fileopenbox()
        img1 = cv2.imread(file1)
        if img1 is None:
            easygui.msgbox("Please select image files only!")
        else:
            file1Ver = True
    elif selection == 1:
        file2 = easygui.fileopenbox()
        img2 = cv2.imread(file2)
        if img2 is None:
            easygui.msgbox("Please select image files only!")
        else:
            file2Ver = True
    elif selection == 2:
        (img1, img2) = downscaleImages(img1, img2)

        img2 = matchRotation(img1, img2)
github CopterExpress / clever-show / Server / Server+GUI_non_xml_dowload.py View on Github external
def upload_animation(self):
        global file
        file = easygui.fileopenbox(filetypes=["*.avi"])  # вызов окна проводника для выбора файла
github fievelmousekewitz / EpicorAutoPilot / EpicorAutoPilot.py View on Github external
def Choice_Backup_Live():
    rightnow = datetime.datetime.now()
    defaultfilename =  rightnow.strftime("%B")
    defaultfilename = defaultfilename[:3] 
    
    if easygui.ynbox('Online Backup?') == 1:
         ynonline = "online"
    else:
        ynonline = ""
    easygui.msgbox(msg='After selecting Source, Destination & Online please wait, this can take a while and you will see no progress bar.')
    PilotApp.Backup(
        easygui.fileopenbox(
            'Select database to backup',
            default=PilotApp.Settings['EpicorDBDir']+'\\'),
        easygui.filesavebox(
            'Filename to backup to',
            default=PilotApp.Settings['EpicorDBDir']+'\\'+ defaultfilename + 'live' + str(rightnow.day ) ),
        ynonline)
github fievelmousekewitz / EpicorAutoPilot / EpicorAutoPilot.py View on Github external
def Choice_Restore_Pilot():
    #Restore From File
    RestoreFile = easygui.fileopenbox("Select File To Restore From","Select File To Restore From",PilotApp.Settings['EpicorBackupDir'])
    usrpw = GetDSNPassword()
    rightnow = datetime.datetime.now()
    compname =  rightnow.strftime("%B")
    compname = compname[:3]
    compname = '--- TEST ' + compname + str(rightnow.day) + ' ---'
    compname = easygui.enterbox(msg='New Pilot Company Name?',default=compname)
    easygui.msgbox(msg='This will take some time, please wait until you see the main app dialog.')
    #Shutdown Pilot
    PilotApp.Shutdown()
    PilotApp.ShutdownDB()
    PilotApp.Restore(RestoreFile)
    PilotApp.StartupDB(5) #Number of retries
    #Connect to db
    PilotDB = EpicorDatabase(PilotApp.Settings['DSN'],usrpw[0], usrpw[1] );del usrpw
    #Update to Pilot Settings
    PilotDB.Sql("UPDATE pub.company set name = \'" + compname + "\'")
github DUanalytics / pyAnalytics / 42-dataIE / data-path.py View on Github external
df1a = pd.read_csv('E:/analytics/projects/pyAnalytics/data/iris.csv')
df1a.head()

#when reverse slash use two back slash
df2 = pd.read_csv('data\\iris.csv')
df2.head()


#import from explorer
import subprocess

subprocess.call("explorer E:\\analytics\\data", shell=True)

#pip install easygui
import easygui
file = easygui.fileopenbox()
file
#not working
df3 = pd.read_csv(easygui.fileopenbox())
df3
#https://www.shanelynn.ie/python-pandas-read_csv-load-data-from-csv-files/
github decalage2 / oletools / oletools / olebrowse.py View on Github external
def main():
    """
    Main function
    """
    try:
        filename = sys.argv[1]
    except:
        filename = easygui.fileopenbox()
    try:
        ole = olefile.OleFileIO(filename)
        listdir = ole.listdir()
        streams = []
        for direntry in listdir:
            #print direntry
            streams.append('/'.join(direntry))
        streams.append(ABOUT)
        streams.append(QUIT)
        stream = True
        while stream is not None:
            msg ="Select a stream, or press Esc to exit"
            title = "olebrowse"
            stream = easygui.choicebox(msg, title, streams)
            if stream is None or stream == QUIT:
                break

easygui

EasyGUI is a module for very simple, very easy GUI programming in Python. EasyGUI is different from other GUI generators in that EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by simple function calls.

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

63 / 100
Full package analysis