Author: bugman Date: Mon Mar 19 10:28:48 2012 New Revision: 15539 URL: http://svn.gna.org/viewcvs/relax?rev=15539&view=rev Log: The program intro print out is now using the status.text_width variable. Modified: 1.3/info.py Modified: 1.3/info.py URL: http://svn.gna.org/viewcvs/relax/1.3/info.py?rev=15539&r1=15538&r2=15539&view=diff ============================================================================== --- 1.3/info.py (original) +++ 1.3/info.py Mon Mar 19 10:28:48 2012 @@ -36,6 +36,7 @@ # relax module imports. import dep_check +from status import Status; status = Status() from version import version @@ -150,34 +151,28 @@ @rtype: str """ - # The width of the printout. - if platform.uname()[0] in ['Windows', 'Microsoft']: - width = 80 - else: - width = 100 - # Some new lines. intro_string = '\n\n\n' # Program name and version. - intro_string = intro_string + self.centre(self.title + ' ' + self.version, width) + '\n\n' + intro_string = intro_string + self.centre(self.title + ' ' + self.version, status.text_width) + '\n\n' # Program description. - intro_string = intro_string + self.centre(self.desc, width) + '\n\n' + intro_string = intro_string + self.centre(self.desc, status.text_width) + '\n\n' # Copyright printout. for i in range(len(self.copyright)): - intro_string = intro_string + self.centre(self.copyright[i], width) + '\n' + intro_string = intro_string + self.centre(self.copyright[i], status.text_width) + '\n' intro_string = intro_string + '\n' # Program licence and help (wrapped). - for line in wrap(self.licence, width): + for line in wrap(self.licence, status.text_width): intro_string = intro_string + line + '\n' intro_string = intro_string + '\n' # Help message. help = "Assistance in using the relax prompt and scripting interface can be accessed by typing 'help' within the prompt." - for line in wrap(help, width): + for line in wrap(help, status.text_width): intro_string = intro_string + line + '\n' # ImportErrors, if any. @@ -187,7 +182,7 @@ # The multi-processor message, if it exists. if hasattr(self, 'multi_processor_string'): - for line in wrap('Processor fabric: %s\n' % self.multi_processor_string, width): + for line in wrap('Processor fabric: %s\n' % self.multi_processor_string, status.text_width): intro_string = intro_string + line + '\n' # Return the formatted text.