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.