title: Python script to copy files
body: <p>I am trying to write a Python script that will copy files from one user’s home directory into another user’s home directory. I want it to copy the permissions, as well. I read the Python API and I think that the copy2 method does just that. However, when I run the following code, I get errors.</p>
  
  <pre><code>import shutil
  
  src = raw_input("Please enter a source: ")
  dst = raw_input("Please enter a destination: ")
  shutil.copy2(src, dst)
  </code></pre>
  
  <p>The error says:</p>
  
  <pre><code>Traceback (most recent call last):
    File "copyfiles.py", line 5, in &lt;module&gt;
      shutil.copy2(src, dst)
    File "/usr/lib/python2.6/shutil.py", line 99, in copy2
      copyfile(src, dst)
    File "/usr/lib/python2.6/shutil.py", line 52, in copyfile
      fsrc = open(src, 'rb')
  IOError: [Errno 2] No such file or directory: '../../../../Desktop/byteswap.c'
  </code></pre>