I captured the detailed traceback with the following line of code:

os.dup2(output.fileno(), sys.stderr.fileno())

Here is the traceback:

Traceback (most recent call last):
  File "foo.py", line 225, in <module>
  File "foo.py", line 196, in main
    daoEngine = win32com.client.Dispatch(r'DAO.DBEngine.36')
  File "win32com\client\__init__.pyc", line 95, in Dispatch
  File "win32com\client\dynamic.pyc", line 98, in _GetGoodDispatchAndUserName
  File "win32com\client\dynamic.pyc", line 78, in _GetGoodDispatch
pywintypes.com_error: (-2147024770, 'The specified module could not be found.', None, None)

On Fri, May 15, 2009 at 8:32 AM, Trevor M. Lango <trevor.lango@gmail.com> wrote:
How do I capture the output?  The compiled code module is being invoked from CreateProcess with dwCreationFlags:=CREATE_NO_WINDOW.

On Thu, May 14, 2009 at 6:03 PM, Mark Hammond <skippy.hammond@gmail.com> wrote:
On 15/05/2009 10:43 AM, Trevor M. Lango wrote:
You are correct; that line of code is wrapped with the following:

        daoEngine = win32com.client.Dispatch(r'DAO.DBEngine.36')
        print sys.exc_info()[0]

How can I obtain a more detailed traceback?

Remove the exception handler.