paste.script.copydir – recursive, interactive copy¶
Module Contents¶
- paste.script.copydir.copy_dir(source, dest, vars, verbosity, simulate, indent=0, use_cheetah=False, sub_vars=True, interactive=False, svn_add=True, overwrite=True, template_renderer=None)¶
Copies the
sourcedirectory to thedestdirectory.vars: A dictionary of variables to use in any substitutions.verbosity: Higher numbers will show more about what is happening.simulate: If true, then don’t actually do anything.indent: Indent any messages by this amount.sub_vars: If true, variables in_tmplfiles and+var+in filenames will be substituted.use_cheetah: If true, then any templates encountered will be substituted with Cheetah. Otherwisetemplate_rendererorstring.Templatewill be used for templates.svn_add: If true, any files written out in directories that are part of a svn working copy will be added (viasvn add).overwrite: If false, then don’t every overwrite anything.interactive: If you are overwriting a file and interactive is true, then ask before overwriting.template_renderer: This is a function for rendering templates (if you don’t want to use Cheetah or string.Template). It should have the signaturetemplate_renderer(content_as_string, vars_as_dict, filename=filename).
- exception paste.script.copydir.SkipTemplate¶
Raised to indicate that the template should not be copied over. Raise this exception during the substitution of your template
- paste.script.copydir.query_interactive(src_fn, dest_fn, src_content, dest_content, simulate)¶
- class paste.script.copydir.LaxTemplate(template)¶