[Tutor] tempfile and webbrowser

Kent Johnson kent37 at tds.net
Fri Sep 8 12:11:04 CEST 2006


Alan Gauld wrote:
>> The file deletion (os.unlink(f.name)) does not work on Windows (it 
>> works on Ubuntu with Python 2.4, though).
>>
>> So, is there a way to get this os.unlink(f.name) to work on Windows?
> 
> Use os.remove() instead.

os.remove() and os.unlink() are identical according to the docs; if you 
look at posix_module.c you can see this is true - they both map to 
posix_unlink().

Kent



More information about the Tutor mailing list