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