How do I copy a file in Python?
I couldn't find anything under os
.
shutil
has many methods you can use. One of which is:
from shutil import copyfile
copyfile(src, dst)
If you use os.path
operations, use copy
rather than copyfile
. copyfile
will only accept strings.