[Tutor] how to redirect sys.__stdout__ back to screen in IDLE

Wong Zhee Shiong zswongg@hotmail.com
Fri Nov 15 20:11:01 2002


Hi All,

I was fiddling IDLE (Python2.2, OS:Win32) with
>>>import sys
>>>sys.stdout=open('t1.txt','w')
>>>1+1
>>>sys.stdout.close()
>>>sys.stdout=sys.__stdout__
>>>print 'hello world'
..... Complaining I/O Errors...

I can't seem to get back to screen output after that,
does anyone know how to redirect it back to screen?

Thanks,
wong




_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail