phoenix_title wx.PyOnDemandOutputWindow

A class that can be used for redirecting Python’s stdout and stderr streams. It will do nothing until something is wrriten to the stream at which point it will create a Frame with a text area and write the text there.


class_hierarchy Class Hierarchy

Inheritance diagram for class PyOnDemandOutputWindow:

method_summary Methods Summary

__init__

CreateOutputWindow

OnCloseWindow

SetParent

Set the window to be used as the popup Frame’s parent.

close

flush

write

Create the output window if needed and write the string to it.


api Class API

class wx.PyOnDemandOutputWindow(object)

A class that can be used for redirecting Python’s stdout and stderr streams. It will do nothing until something is wrriten to the stream at which point it will create a Frame with a text area and write the text there.


Methods

__init__(self, title="wxPython: stdout/stderr")


CreateOutputWindow(self, txt)


OnCloseWindow(self, event)


SetParent(self, parent)

Set the window to be used as the popup Frame’s parent.



close(self)


flush(self)


write(self, text)

Create the output window if needed and write the string to it. If not called in the context of the gui thread then CallAfter is used to do the work there.