12345678910 |
- import os
- def symlink(source, link_name, relative = False): #, override = False):
- if relative:
- source = os.path.relpath(source, os.path.dirname(link_name))
- # os.path.lexists() returns True if path refers to an existing path and
- # True for broken symbolic links.
- # if override and os.path.lexists(link_name):
- # os.remove(link_name)
- os.symlink(source, link_name)
|