> You're right, I realised after playing with Tim's example that the 
> problem was that I wasn't calling close() on the codecs file. Adding 
> this after the f.write(html_text) seems to flush the buffer which means 
> that the content now gets written to the file.

Hi Frank,

Quick note: it may be important to write and read from the file using 
binary mode "b".  It's not so significant under Unix, but it is more 
significant under Windows, because otherwise we may get some weird 
results.

Good luck!
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to