code: def get_dir(self):
          
          if "-WD" in sys.argv and self.FIRST_RUN:
              ind = sys.argv.index('-WD')
              self.WD = os.path.abspath(sys.argv[ind+1])
              os.chdir(self.WD)
              self.WD = os.getcwd()
              self.dir_path.SetValue(self.WD)
          else:
              self.on_change_dir_button(None)
              #self.WD = os.getcwd()
  
          self.FIRST_RUN = False
docs: Choose a working directory dialog.
          Called by self.get_dm_and_wd.