How to delete file?

Peter Hansen peter at
Sun Jun 2 16:37:31 CEST 2002

Ken wrote:
> How do you delete file?


> If you write to file from beginning position of an existing file, do you
> overwrite the existing data or insert from it?

You overwrite the data.  It's not possible to insert data except by
writing the data to a new file, appending the contents of the old
file, deleting the old file, then renaming the new one to the old name.


More information about the Python-list mailing list