The os.remove() works whether or not the link is broken or valid or an actual file.
if os.path.lexists(dest):
os.remove(dest)
os.symlink(src,dest)
(For more detail, see also June2013)Mostly Linux & Python syntax notes and hyperlinks.
if os.path.lexists(dest):
os.remove(dest)
os.symlink(src,dest)
(For more detail, see also June2013)
No comments:
Post a Comment