No os.copy()? Why not?

HoneyMonster someone at someplace.invalid
Mon Apr 2 17:11:52 EDT 2012


On Wed, 28 Mar 2012 13:12:30 -0700, John Ladasky wrote:

> I'm looking for a Python (2.7) equivalent to the Unix "cp" command.
> Since the equivalents of "rm" and "mkdir" are in the os module, I
> figured I look there.  I haven't found anything in the documentation.
> I am also looking through the Python source code in os.py and its child,
> posixfile.py.
> 
> Any help?  Thanks.

One way:
import os

os.system ("cp src sink")




More information about the Python-list mailing list