def link(target, link_to):
 assert isinstance(target, str)
 assert os.path.exists(target)
 assert isinstance(link_to, str)
 abs_path = os.path.dirname(os.path.abspath(link_to))
 if (not os.path.isdir(abs_path)):
  os.makedirs(abs_path)
 chmod(target)
 os.symlink(target, link_to)

def link ( target , link_to ) : assert isinstance ( target , str ) assert os . path . exists ( target ) assert isinstance ( link_to , str ) abs_path = os . path . dirname ( os . path . abspath ( link_to ) ) if ( not os . path . isdir ( abs_path ) ) : os . makedirs ( abs_path ) chmod ( target ) os . symlink ( target , link_to )
hard links src to dst .