How to use the easygui.diropenbox 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 micmarty / Instronizer / src / classifier / test_file_chooser.py View on Github external
import easygui
from pathlib import Path, PurePath
import subprocess

'''GUI for choosing single wav file'''
# Needs modification (@moonman)

file_path = easygui.fileopenbox(
    default='~/Desktop/*.wav',
    filetypes=['*.wav'],
    title='Choose a single wav file with solo instrument')

out_dir = easygui.diropenbox(
    default='~/Music',
    title='Choose ouput directory for generated spectrograms')

# Create output dir
file_path = Path(file_path) 
out_dir = Path(out_dir, 'spectrograms')
out_dir.mkdir(exist_ok=True)
print("Created directory: ", out_dir)

# Execute preprocessor
subprocess.check_call(['python', '/home/miczi/Projects/single-instrument-recognizer/src/preprocessor.py', 
                        '--single-file-input', str(file_path), 
                        '--output-spectrograms-dir', str(out_dir)])

subprocess.check_call(['python', '/home/miczi/Projects/single-instrument-recognizer/src/mobilenet_train.py',
                        '-a', 'mobilenet',
github AppliedMechanics-EAFIT / SolidsPy / solidspy / preprocesor.py View on Github external
- echo: echo output files.
    """
    # Check Python version
    version = sys.version_info.major
    if version == 3:
        global raw_input
        raw_input = input
    elif version == 2:
        pass
    else:
        raise ValueError("You should use Python 2.x at least!")

    # Try to run with easygui
    try:
        import easygui
        folder = easygui.diropenbox(title="Folder for the job") + "/"
    except:
        folder = raw_input('Enter folder (empty for the current one): ')

    return folder
github avidLearnerInProgress / python-automation-scripts / code-to-pdf-converter / converter.py View on Github external
def main():
    print("Choose directory:")
    choosen_path=easygui.diropenbox("Path containing .cpp files:")
    try:
        get_path=choosen_path+'\\'
        newObtainedPath=generateMultiplePDF(get_path)
        mergeIntoOnePDF(newObtainedPath)
    except Exception as e:
        print(str(e))
github mattb112885 / clusterDbAnalysis / lib / GuiBase.py View on Github external
def _get_directory(self):
        ''' Dialog box for getting a directory to which to save files. '''
        return easygui.diropenbox(msg="Where would you like to save the results files?", title="Choose a directory", default=None)
    def _get_file_name(self, extension="txt"):
github AppliedMechanics-EAFIT / SolidsPy / main / preprocesor.py View on Github external
- name: name for the output files (if echo is True).
    - echo: echo output files.
    """
    # Check Python version
    version = sys.version_info.major
    if version == 3:
        raw_input = input
    elif version == 2:
        pass
    else:
        raise ValueError("You should use Python 2.x at least!")

    # Try to run with easygui
    try:
        import easygui
        folder = easygui.diropenbox(title="Folder for the job") + "/"
    except:
        folder = raw_input('Enter folder (empty for the current one): ')

    return folder
github AppliedMechanics-EAFIT / SolidsPy / MAIN / solids_ISO_GUI_sparse.py View on Github external
import assemutil as ass
#
# Check Python version
#
version = sys.version_info.major
if version == 3:
    raw_input = input
elif version == 2:
    pass
else:
    raise ValueError("You should use Python 2.x at least!")

# Try to run with easygui
try:
    import easygui
    folder = easygui.diropenbox(title="Folder for the job") + "/"
    name = easygui.enterbox("Enter the job name")
    echo = easygui.buttonbox("Do you want to echo files?",
                             choices=["Yes", "No"])

except:
    folder = raw_input('Enter folder (empty for the current one): ')
    name   = raw_input('Enter the job name: ')
    spring_pos = raw_input("Do you have springs in your model? (y/N):")
    echo   = raw_input('Do you want to echo files? (y/N):')


start_time = datetime.now()

#%% PRE-PROCESSING
#
nodes, mats, elements, loads = pre.readin(folder=folder)

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

61 / 100
Full package analysis