Author: bugman Date: Thu May 31 17:50:28 2012 New Revision: 16570 URL: http://svn.gna.org/viewcvs/relax?rev=16570&view=rev Log: Removed the starting newline from the user function prompt help string. Modified: branches/uf_redesign/prompt/uf_docstring.py branches/uf_redesign/prompt/uf_objects.py Modified: branches/uf_redesign/prompt/uf_docstring.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/uf_docstring.py?rev=16570&r1=16569&r2=16570&view=diff ============================================================================== --- branches/uf_redesign/prompt/uf_docstring.py (original) +++ branches/uf_redesign/prompt/uf_docstring.py Thu May 31 17:50:28 2012 @@ -56,24 +56,32 @@ return new_text -def build_subtitle(text, bold=True): +def build_subtitle(text, bold=True, start_nl=True): """Create the formatted subtitle string. @param text: The name of the subtitle. @type text: str - @keyword colour: A flag which if true will return bold text. Otherwise an underlined title will be returned. - @type colour: bool + @keyword bold: A flag which if true will return bold text. Otherwise an underlined title will be returned. + @type bold: bool + @keyword start_nl: A flag which if True will add a newline to the start of the text. + @type start_nl: bool @return: The formatted subtitle. @rtype: str """ + # Starting newline. + if start_nl: + new = "\n" + else: + new = "" + # Bold. if bold: - new = "\n%s\n\n" % bold_text(text) + new += "%s\n\n" % bold_text(text) # Underline. else: - new = "\n%s\n%s\n\n" % (text, "~"*len(text)) + new += "%s\n%s\n\n" % (text, "~"*len(text)) # Return the subtitle. return new Modified: branches/uf_redesign/prompt/uf_objects.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/uf_objects.py?rev=16570&r1=16569&r2=16570&view=diff ============================================================================== --- branches/uf_redesign/prompt/uf_objects.py (original) +++ branches/uf_redesign/prompt/uf_objects.py Thu May 31 17:50:28 2012 @@ -233,7 +233,7 @@ doc = "" # A title. - doc += build_subtitle("The %s user function." % self._name) + doc += build_subtitle("The %s user function." % self._name, start_nl=False) # The synopsis. doc += build_subtitle("Synopsis")