2 from wxPython
.wx 
import * 
   4 #--------------------------------------------------------------------------- 
   6 def runTest(frame
, nb
, log
): 
   7     dlg 
= wxDirDialog(frame
, "Choose a directory:", 
   8                       style
=wxDD_DEFAULT_STYLE|wxDD_NEW_DIR_BUTTON
) 
   9     if dlg
.ShowModal() == wxID_OK
: 
  10         log
.WriteText('You selected: %s\n' % dlg
.GetPath()) 
  13 #--------------------------------------------------------------------------- 
  20 This class represents the directory chooser dialog. 
  24 if __name__ 
== '__main__': 
  27     run
.main(['', os
.path
.basename(sys
.argv
[0])])