[Tutor] shutils.copytree

Tim Golden mail at timgolden.me.uk
Fri Jan 11 15:03:23 CET 2008


Tony Cappellini wrote:
>> The source for copytree says, "The destination directory must not
>> already exist." I suppose that is why you have a problem but I don't
>> know the specific cause. Did you get a traceback?
>>
>> The source also says, "Consider this example code rather than the
>> ultimate tool" so maybe you should just copy it and make a version that
>> does what you want. See shutil.py in your Python lib directory.
> 
> The problem with that concept of "modifying the distribution as you
> go" 

I don't think that's the idea; rather that you cut-and-paste
the code (it's not huge), make it work for you, and add it to
your project's own "utils" module or whatever. Still a bit hackish,
but not the DIY-distro you're suggesting here.

TJG


More information about the Tutor mailing list