I'm running Python 2.7.6, PythonWin build 218 on Windows 7 Pro, 32-Bit

The code below hangs after the browse() function returns to the caller.
I do see "After" displayed in the console window.

Is anyone else seeing this problem on Windows?
Thanks

import win32ui
import os


def browse(startingDirectory=None,defaultFilespec="*.*"):

   if startingDirectory is not None:
      startingDirectory = os.getcwd()
   FILE_OPEN = 1
   dlg = win32ui.CreateFileDialog( FILE_OPEN, defaultFilespec )
   fn  = None
   try:
      if dlg:
         dlg.SetOFNInitialDir( startingDirectory )
         dlg.DoModal()
         fn = dlg.GetPathName()
   finally:
      del dlg

   return fn

print"\nBefore"
browse()
print"\nAfter\n"
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to