forced overwrite in os.symlink

Benyang Tang btang at pacific.jpl.nasa.gov
Fri Mar 10 01:08:50 EST 2000


In using

os.symlink(file1,file2)

if file2 already exists, it results in an os.error. Is there a function for overwriting an existing file, or do I have to use

os.system('ln -sf ' + file1 + ' ' + file2)



More information about the Python-list mailing list