'You must provide no more than %(max_args)s arguments'
'You must provide at least %(min_args)s arguments'
Prompt the user. Default can be true, false, 'careful' or 'none'. If 'none' then the user must enter y/n. If 'careful' then the user must enter yes/no (long form).
If the interactive option is over two (-ii) then safe will be used as a default. This option should be the do-nothing option.
Prompt the user for a variable.
Create a standard OptionParser instance.
Typically used like:
class MyCommand(Command): parser = Command.standard_parser()
Subclasses may redefine standard_parser, so use the nearest superclass's class method.
Return a shorted form of the filename (relative to the current directory), typically for displaying in messages. If *paths are present, then use os.path.join to create the full filename before shortening.
Ensure that the directory exists, creating it if necessary. Respects verbosity and simulation.
Adds directory to subversion if .svn/ directory exists in parent, and directory was created.
Ensure a file named filename exists with the given content. If --interactive has been enabled, this will ask the user what to do if a file exists with different content.
Inserts text into the file, right after the given marker. Markers look like: -*- <marker_name>[:]? -*-, and the text will go on the immediately following line.
Raises ValueError if the marker is not found.
If indent is true, then the text will be indented at the same level as the marker.
Runs the command, respecting verbosity and simulation. Returns stdout, or None if simulating.
There's a bug in Windows when running an executable that's located inside a path with a space in it. This method handles that case, or on non-Windows systems or an executable with no spaces, it just leaves well enough alone.
Like ensure_file, but without the interactivity. Mostly deprecated. (I think I forgot it existed)
Given a configuration filename, this will return a map of values.
Given a configuration filename, this will add items in the vars mapping to the configuration file. Will create the configuration file if it doesn't exist.
Indent the block of text (each line is indented). If you give initial, then that is used in lieue of indent for the first line.
Setup logging via the logging module's fileConfig function with the specified config_file, if applicable.
See the source for more information.