On Saturday 16 July 2011 03:15:12 Richard D. Moores wrote: > But that makes me wonder if there isn't a simpler way to do it with > Python -- to delete the contents of a file without deleting the file?
Up to now, knowing no better ;-), I have opened the file in, or copied and pasted the contents of a file into, a word processor and turned on the non-printing characters. It is then easy to see extraneous spaces, empty lines etc. I then go back to the editor and do the revealed editing. Rough, ready and cobbled - but easy, and it works. ;-) If you use Windows and have no idea what I am talking about, I apologise. It is so long since I used Windows that I have forgotten much of what it can and cannot do; and I don't know whether it can do this. Lisi _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor