Hi all.
I am using IDLE when I am on the python shell, I do:

>>>import os
>>>os.mkdir('newdir')
>>>from dirutils import dir_util
>>>#copy a big directory tree
>>>dir_util.copy_tree('big_directory','newdir')

This works properly, but I find a huge Resource Comsumption of my PC.
100% of CPU and Memory.

Now, when I put the same steps a python file and then Run Module:

copy_tree is failing with

Traceback (most recent call last):
  File "C:\builds\AutomateBuild\pyBuildAutomate.py", line 19, in ?
    dir_util.copy_tree('Py4CliLinux','CliAuto-lin')
  File "C:\Python24\Lib\distutils\dir_util.py", line 172, in copy_tree
    dry_run=dry_run))
  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: 'big_directory/some/path'
# modified the actual names.

- What I am doing is trying to copy a directory tree to a another
directory tree.
- shutil.copytree does not help as it requires the dst directory to be
absent.

Any help?

Thanks!
Senthil


--
http://puggy.symonds.net/~senthil

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to