#NEWLINE# def diropenbox( msg = None , title = None , default = None ) : #NEWLINE# #INDENT# '\n    A dialog to get a directory name.\n    Note that the msg argument, if specified, is ignored.\n\n    Returns the name of a directory, or None if user chose to cancel.\n\n    If the "default" argument specifies a directory name, and that\n    directory exists, then the dialog box will start with that directory.\n\n    :param str msg: the msg to be displayed\n    :param str title: the window title\n    :param str default: starting directory when dialog opens\n    :return: Normalized path selected by user\n    ' #NEWLINE# title = getFileDialogTitle ( msg , title ) #NEWLINE# localRoot = Tk ( ) #NEWLINE# localRoot . withdraw ( ) #NEWLINE# if ( not default ) : #NEWLINE# #INDENT# default = None #NEWLINE# #UNINDENT# f = ut . tk_FileDialog . askdirectory ( parent = localRoot , title = title , initialdir = localRoot , initialfile = None ) #NEWLINE# localRoot . destroy ( ) #NEWLINE# if ( not f ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# return os . path . normpath ( f )