Skip to content

Instantly share code, notes, and snippets.

@chirag-v
Last active December 12, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chirag-v/4782985 to your computer and use it in GitHub Desktop.
Save chirag-v/4782985 to your computer and use it in GitHub Desktop.
copying content of file into a new file using shutil
import shutil
with open('/home/user/acetylene.xyz','r') as fsrc:
with open('/home/user/acetylene-copy.xyz','w') as fdst:
shutil.copyfileobj(fsrc, fdst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment