I'm using Python 2.3 on Windows Xp.

The import statement below caused a colleague's program to crash at run time
(ignoring indentation inconsistencies in this email)

import win32ui  #<--- this causes a run time crash, when the app is an exe

def BrowseForFile(startingDirectory=None, defaultFilespec='*.*'):
   '''Invokes the Windows common File browser dialog,  
   '''
   fn=''
   
   if not startingDirectory:
      startingDirectory = os.getcwd()
   FILE_OPEN = 1
   dlg=win32ui.CreateFileDialog(FILE_OPEN, defaultFilespec)
   fn = None
    if dlg:
       dlg.SetOFNInitialDir(startingDirectory)
       dlg.DoModal()
       fn=dlg.GetFileName()

   return fn

Does anyone have any ideas why this is occurring?