Stdout redirection needs a flush() method

Hello,

sys.stdout.flush() is often useful when stdout and stderr are redirected to
a file.
(My app is created this way:
      app = wx.App(redirect=True,filename='c:/temp/output.txt'
)

But the PyOnDemandOutputWindow class
(used when redirecting stdio to a window: filename=None)
does not have a flush() method.

I think it should provide more file-like behaviour.
Even an empty method would be OK:
      def flush(self): pass

···

--
Amaury Forgeot d'Arc

Good idea. It's done.

···

amaury.forgeotdarc@ubitrade.com wrote:

Hello,

sys.stdout.flush() is often useful when stdout and stderr are redirected to
a file.
(My app is created this way:
      app = wx.App(redirect=True,filename='c:/temp/output.txt'
)

But the PyOnDemandOutputWindow class
(used when redirecting stdio to a window: filename=None)
does not have a flush() method.

I think it should provide more file-like behaviour.
Even an empty method would be OK:
      def flush(self): pass

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!