def symlink(target, link):
if islink(link):<EOL><INDENT>unlink(link)<EOL><DEDENT>if platform.system() == "<STR_LIT>":<EOL><INDENT>if sys.version_info[:<NUM_LIT:2>] < (<NUM_LIT:3>, <NUM_LIT:5>):<EOL><INDENT>with open(os.devnull, "<STR_LIT:w>") as nul:<EOL><INDENT>subprocess.check_call(["<STR_LIT>", "<STR_LIT>", link, target], shell=True, stdout=nul)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>_winapi.CreateJunction(target, link)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>os.symlink(target, link)<EOL><DEDENT>
os.symlink() but use a junction point on Windows.