title: Copying a symbolic link in Python
body: <p>I want to copy a file <code>src</code> to the destination <code>dst</code>, but if <code>src</code> happens to be a symbolic link, preserve the link instead of copying the contents of the file. After the copy is performed, <code>os.readlink</code> should return the same for both <code>src</code> and <code>dst</code>.</p>
  
  <p>The module <code>shutil</code> has several functions, such as <code>copyfile</code>, <code>copy</code> and <code>copy2</code>, but all of these will copy the <em>contents</em> of the file, and will not preserve the link. <code>shutil.move</code> has the correct behavior, other than the fact it removes the original file.</p>
  
  <p>Is there a built-in way in Python to perform a file copy while preserving symlinks?</p>