How can I disable PythonWin's "Output redirection to win32trace remote collector" feature without removing PythonWin?

When I run the wxPython application, it prints the line "Redirecting output to win32trace remote collector" and I have to open the PythonWin trace collector tool to view this trace output.

Since I'm not interested in collecting this output, how do I disable this feature?

+1


source to share


3 answers


You can even pass this in when you instantiate wx.App ():

if __name__ == "__main__":
    app = wx.App(redirect=False) #or 0
    app.MainLoop()

      



wxPython wx.App docs

+2


source


This post tricked me into thinking that win32trace is preventing me from seeing thrown exceptions in the regular console (my IDE). The real problem was that wxPython by default redirects stdout / stderr to a popup that quickly disappears after an uncaught exception. To fix this problem I just had to pass

redirect = 0


to the superclass constructor of my application.
class MyApp(wx.App):
    def __init__(self):
        # Prevent wxPython from redirecting stdout/stderr:
        super(MyApp, self).__init__(redirect=0)

      

Regardless, I'm still wondering how to manage win32trace.

+1


source


Seems to be a problem with TortoiseHG . This also happens when using win32gui.GetOpenFileNameW. Uninstalling solves this problem. Unfortunately I haven't found a real solution on how to fix this.

+1


source







All Articles