Redirect Graphical output

Indian write2abdul at gmail.com
Sat Nov 15 04:27:47 EST 2008


Hi Friends,

Is there any way we can redirect graphical output to some file
What i require is to run a test for my function but it involves dialog boxes
but a test shld be run without user intervention :(


import sys
import dialog
import wx
app = wx.PySimpleApp()
sys.stdout = open('c:\\abc.txt','w')
dialog.ConfirmMessageBox('hello','abdul',wx.OK)
sys.stdout=sys.__stdout__

I was trying to use the above code but noticed it was tough to redirect to a
file
Please help :)

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20081115/7e76d6bd/attachment.html>


More information about the Python-list mailing list