[Tutor] shutils.copytree

Alan Gauld alan.gauld at btinternet.com
Fri Jan 11 15:08:06 CET 2008

"Tony Cappellini" <cappy2112 at gmail.com> wrote

>> 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.
> Yes, I did read that and was shocked. Is everything in python that
> iffy?

No, thats why thee is a comment on that bit! :-)

> The problem with that concept of "modifying the distribution as you
> go" is that those changes must be moved to every system where your
> program will run,

Correct, one big advantage of using classes.modules.
So you should create your code in a module and then it is
no different to the rest of your application.

> and whenever python is updated, you have to remember
> to save the changes before uninstalling the current version.

Its always wise to have your local code somewhere other
than in the system space IMHO. I habe Python in


and my projects/modules on


This also helps if you want to run multiple copies of Python
Just set the PYTHONPATH environment variable to point at
the projects directory.


Alan G. 

More information about the Tutor mailing list