How to delete file?
Peter Hansen
peter at engcorp.com
Sun Jun 2 10:37:31 EDT 2002
Ken wrote:
>
> How do you delete file?
os.remove()
> 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.
-Peter
More information about the Python-list
mailing list