← Back to team overview

kicad-developers team mailing list archive

Re: Python-a-mingw-us Windows Debug Scripting Builds

 

On 08/31/2013 03:00 PM, Brian Sidebotham wrote:
>>> Q:
> 
>     >>
>     >> (i) Does anyone see any output from the PyErr_Print() calls?
> 
>     Try using a tool like Debug Viewer available from Microsoft.  If
>     PyErr_Print() is anything like wxLogXXX(), on Windows the output is sent
>     to the OutputDebugString() function which does not end up on stdout.
>     You can find the debug viewer here:
> 
>     http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
> 
>     You must run the debug viewer as Administrator in order to see the
>     debugging strings.
> 
> 
> GDB reports OutputDebugString() too on Windows. For example, I see output from the
> wxLogXXX() function that reports setting the KISYSMOD environment variable. I suspect
> PyErr_Print() just pipes to stderr or stdout.
> 
> Thanks,
> 
> Brian.



Brian,

Look at the source code.  Start with line 1057 of pythonrun.c.  That takes you to
PyErr_PrintEx(), line 1151.

hook = PySys_GetObject("excepthook")

It seems you have to install a "excepthook" someplace before calling PyErr_Print(), at
least somebody or something does.

Dick



> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References