How to delete file?

Emile van Sebille emile at fenx.com
Sun Jun 2 10:40:10 EDT 2002


(forgot my sample overwrite)

>>> import string
>>> open(r'c:\test.txt', 'w').write(string.letters)
>>> fd = open(r'c:\test.txt', 'r+')
>>> fd.seek(12)
>>> fd.write('hiHI!')
>>> fd.flush()
>>> fd.close()
>>> fc = open(r'c:\test.txt', 'rw').read()
>>> fc
'abcdefghijklhiHI!rstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
>>>

--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list