The copydir module is accessible via the paste.script module.
'Responses:\n Y(es): Overwrite the file with the new content.\n N(o): Do not overwrite the file.\n D(iff): Show a unified diff of the proposed changes (dc=context diff)\n B(ackup): Save the current file contents to a .bak file\n (and overwrite)\n Type "all Y/N/B" to use Y/N/B for answer to all future questions\n'
{'SkipTemplate': <class 'paste.script.copydir.SkipTemplate'>,
'bool': <type 'bool'>,
'empty': '""',
'html_quote': <function html_quote at 0x8c8764c>,
'nothing': None,
'repr': <built-in function repr>,
'skip_template': <function skip_template at 0x8c87064>,
'str': <type 'str'>,
'test': <function test at 0x8c87374>,
'url_quote': <function url_quote at 0x8c8702c>}
Copies the source directory to the dest directory.
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 _tmpl files and +var+ in filenames will be substituted.
use_cheetah: If true, then any templates encountered will be substituted with Cheetah. Otherwise template_renderer or string.Template will be used for templates.
svn_add: If true, any files written out in directories with .svn/ directories will be added (via svn 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 signature template_renderer(content_as_string, vars_as_dict, filename=filename).
Checks if a file should be skipped based on its name.
If it should be skipped, returns the reason, otherwise returns None.
Substitutes the template with the variables, using the .body() method if it exists. It assumes that the variables were also passed in via the searchList.
Run a substitution, returning the value. If an error occurs, show the filename. If the error is a NameError, show the variables.
Raise SkipTemplate, which causes copydir to skip the template being processed. If you pass in a condition, only raise if that condition is true (allows you to use this with string.Template)
If you pass any additional arguments, they will be used to instantiate SkipTemplate (generally use like skip_template(license=='GPL', 'Skipping file; not using GPL'))
Raised to indicate that the template should not be copied over. Raise this exception during the substitution of your template
This class contains 6 members.
This class contains 14 members.
This class contains 4 members.
See the source for more information.