def browse_dialog_dir ( ) : _go_to_package ( ) logger_directory . info ( "enter browse_dialog" ) _path_bytes = subprocess . check_output ( [ 'python' , 'gui_dir_browse.py' ] , shell = False ) _path = _fix_path_bytes ( _path_bytes , file = False ) if len ( _path ) >= 1 : _path = _path [ 0 ] else : _path = "" logger_directory . info ( "chosen path: {}" . format ( _path ) ) logger_directory . info ( "exit browse_dialog" ) return _path
python dialog choose directory
Open up a GUI browse dialog window and let to user pick a target directory . : return str : Target directory path
def browse_dialog_dir():
    """
    Open up a GUI browse dialog window and let to user pick a target directory.
    :return str: Target directory path
    """
    _go_to_package()
    logger_directory.info("enter browse_dialog")
    _path_bytes = subprocess.check_output(['python', 'gui_dir_browse.py'], shell=False)
    _path = _fix_path_bytes(_path_bytes, file=False)
    if len(_path) >= 1:
        _path = _path[0]
    else:
        _path = ""
    logger_directory.info("chosen path: {}".format(_path))
    logger_directory.info("exit browse_dialog")
    return _path