Paul Probert said:
Gordon,
I don't know anything about Boa, but it looks like you want to create a
popup window in your thread?
···
---------
Hi,
Actually, that is the main thread and it is the initialization of the
wxPython wx.App (has nothing to do with boa). The constructor is
__init__(self, redirect=False, filename=None, useBestVisual=False,
clearSigInt=True)
where redirect sends any sys.stdout and sys.stderr to a popup window. I was
setting redirect = True on Windows and a popup box would show any print
statements without problems (actually 2 popup boxes come up so maybe that is
not 100% OK but there is no exception thrown). On Linux there *is* an
exception thrown but no traceback as I said in the original message leaving
me in the dark. Paul's function helped that.
The root of the problem is that there is a print statement in the subthread
that was causing the exception. Because there was no traceback I thought
that the problem was with opening the serial port or file to write to. It
was only what I thought was a benign print statement that was causing all
this grief.
If I set redirect = False then all output goes to the console and things
work as I expect.
As I mentioned in an earlier message the default for redirect is different
for Linux (False) from what it is for Windows/Mac (True). I guess there
must be some reason for it
Thanks for all your help.
Regards,
Gordon Williams