Getting PythonWin debugger working with an embedded app.

Stidolph, David stidolph at
Mon Nov 22 16:12:03 CET 1999

I am trying to get the Python Win debugger working with our app.  We have
embedded Python and using it as a script language.  We are using the debug
version of the Python DLL for Windows.

I copied the pywin directory to our python system directory (plus adding
that to the search path) and put the following code in one of our scripts
(to be activated from a menu item within our ui):

import pywin.debugger
    a = 1 / 0

I get the following output:

Traceback (innermost last):
  File "python\client\Interface\", line 272, in DoMenuCommand
  File "python\client\Interface\", line 304, in OnMenuDebug
  File "C:\Program Files\Python\Pythonwin\pywin\debugger\", line
70, in post_mortem
    p = _GetCurrentDebugger()
  File "C:\Program Files\Python\Pythonwin\pywin\debugger\", line
9, in _GetCurrentDebugger
    import debugger
  File "C:\Program Files\Python\Pythonwin\pywin\debugger\", line
19, in ?
    import win32ui
ImportError: No module named win32ui

I tried putting the contents of the PythonWin directory in the pywin
directory and it still has the same message.
In looking at the message I see that it is going to the installed place of
Python and PythonWin instead of my search path.  I can see the
module, and it is directly in the Python search path, so what am I doing

Any advice or suggestions would be truly welcome.  Getting the debugger
working would be a huge step forward for us.

Thanks for you help,


More information about the Python-list mailing list