Hi,

I use paste.templates.Template to create folder structures.

I have a template that needs to create some files *or* to upgrade them
automatically with a 'smart' function that decides on the fly what to
change.

let's take an example:

$ paster create -t my_template my_folder
Creating my_folder/stuff.txt
$ more my_folder/stuff.txt
one line

$ paster create -t my_template my_folder
Creating my_folder/stuff.txt
Uh-Ho it's already there !
upgrading..
$ more my_folder/stuff.txt
one line
one line (again!)

The best way i have found to do that is to use to interactive mode and
to patch copydir.query_interactive in my template class to automate a
smart diff.

I am pretty sure there's a clean way to do all this :)

Any tips ?

Thanks

Tarek

-- 
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to