> I understand that the class is taking the strings from
> stdout (supplied by the print statements) and writing
> them to a text file.  Does the user need to explicitly
> call the write function?  For example:
> 
> sys.stdout = Writer('tmp.log').write(whatever the
> message is)

No, that's what print does.
The Writer is replacing the stdout file-like object with 
your Writer file-like object. print just uses whatever 
file-like object is connected to stdout.

Alan G.

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to