CMS 3D CMS Logo

List of all members | Public Member Functions
cmsHarvester.CMSHarvesterHelpFormatter Class Reference

Helper class: CMSHarvesterHelpFormatter. More...

Inheritance diagram for cmsHarvester.CMSHarvesterHelpFormatter:

Public Member Functions

def format_usage (self, usage)
 

Detailed Description

Helper class: CMSHarvesterHelpFormatter.

Helper class to add some customised help output to cmsHarvester.

We want to add some instructions, as well as a pointer to the CMS
Twiki.

Definition at line 153 of file cmsHarvester.py.

Member Function Documentation

◆ format_usage()

def cmsHarvester.CMSHarvesterHelpFormatter.format_usage (   self,
  usage 
)

Definition at line 161 of file cmsHarvester.py.

161  def format_usage(self, usage):
162 
163  usage_lines = []
164 
165  sep_line = "-" * 60
166  usage_lines.append(sep_line)
167  usage_lines.append("Welcome to the CMS harvester, a (hopefully useful)")
168  usage_lines.append("tool to create harvesting configurations.")
169  usage_lines.append("For more information please have a look at the CMS Twiki:")
170  usage_lines.append(" %s" % twiki_url)
171  usage_lines.append(sep_line)
172  usage_lines.append("")
173 
174  # Since we only add to the output, we now just append the
175  # original output from IndentedHelpFormatter.
176  usage_lines.append(optparse.IndentedHelpFormatter. \
177  format_usage(self, usage))
178 
179  formatted_usage = "\n".join(usage_lines)
180  return formatted_usage
181 

References join().

join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17