101 copy.close() |
101 copy.close() |
102 print 'keep current version, the new file has been written to', copy_file |
102 print 'keep current version, the new file has been written to', copy_file |
103 else: |
103 else: |
104 print 'no diff between %s and %s' % (appl_file, ref_file) |
104 print 'no diff between %s and %s' % (appl_file, ref_file) |
105 |
105 |
106 |
106 SKEL_EXCLUDE = ('*.py[co]', '*.orig', '*~', '*_flymake.py') |
107 def copy_skeleton(skeldir, targetdir, context, |
107 def copy_skeleton(skeldir, targetdir, context, |
108 exclude=('*.py[co]', '*.orig', '*~', '*_flymake.py'), |
108 exclude=SKEL_EXCLUDE, askconfirm=False): |
109 askconfirm=False): |
|
110 import shutil |
109 import shutil |
111 from fnmatch import fnmatch |
110 from fnmatch import fnmatch |
112 skeldir = normpath(skeldir) |
111 skeldir = normpath(skeldir) |
113 targetdir = normpath(targetdir) |
112 targetdir = normpath(targetdir) |
114 for dirpath, dirnames, filenames in walk(skeldir): |
113 for dirpath, dirnames, filenames in walk(skeldir): |