[Distutils] copy_tree?

none nonoe safesticks at yahoo.com
Sat Apr 1 04:18:51 CEST 2006


After running this (break.py)::



import os, shutil, distutils.dir_util

os.mkdir("./a")
os.popen("touch ./a/testfile")
distutils.dir_util.copy_tree("./a", "./b")

shutil.rmtree("./b")
distutils.dir_util.copy_tree("./a", "./b")





I get this error::
Traceback (most recent call last):
  File "break.py", line 8, in ?
    distutils.dir_util.copy_tree("./a", "./b")
  File "C:\Python24\lib\distutils\dir_util.py", line 175, in copy_tree
    preserve_times, update, dry_run=dry_run)
  File "C:\Python24\lib\distutils\file_util.py", line 165, in copy_file
    _copy_file_contents(src, dst)
  File "C:\Python24\lib\distutils\file_util.py", line 47, in _copy_file_contents

    fdst = open(dst, 'wb')
IOError: [Errno 2] No such file or directory: './b\\testfile'

Am I doing something wrong?

S

		
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1¢/min.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/distutils-sig/attachments/20060331/d3a6a147/attachment.htm 


More information about the Distutils-SIG mailing list