[EMAIL PROTECTED] wrote:

In short, how might I go about deleting just the contents of a file?

File objects have a truncate() method which chops the file back to zero length (or a length that you specify).

But why not just delete the file? You can always
create another one with the same name later if
you want.

--
Greg Ewing, Computer Science Dept,
University of Canterbury,       
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to