Module info :: Class Info_box
[hide private]
[frames] | no frames]

Class Info_box

source code


A container storing information about relax.

Instance Methods [hide private]
 
__init__(self)
Create the program introduction text stings.
source code
 
_setup_references(self)
Build a dictionary of all references useful for relax.
source code
str
centre(self, string, width=100)
Format the string to be centred to a certain number of spaces.
source code
str
file_type(self, path)
Return a string representation of the file type.
source code
int
format_max_width(self, data)
Return the text formatting width for the given data.
source code
str
intro_text(self)
Create the introductory string for STDOUT printing.
source code
str
package_info(self)
Return a string for printing to STDOUT with info from the Python packages used by relax.
source code
str
ram_info(self, format=' %-25s%s\n')
Return a string for printing to STDOUT with info from the Python packages used by relax.
source code
str
relax_module_info(self)
Return a string with info about the relax modules.
source code
str
sys_info(self)
Return a string for printing to STDOUT with info about the current relax instance.
source code
str
win_arch(self)
Determine the MS Windows architecture.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(self, *args, **kargs)
Replacement function for implementing the singleton design pattern.
source code
Class Variables [hide private]
  instance = None
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Create the program introduction text stings.

This class generates a container with the following objects:

  • title: The program title 'relax'
  • version: For example 'repository checkout' or '1.3.8'.
  • desc: The short program description.
  • copyright: A list of copyright statements.
  • licence: Text pertaining to the licencing.
  • errors: A list of import errors.
Overrides: object.__init__

__new__(self, *args, **kargs)
Static Method

source code 

Replacement function for implementing the singleton design pattern.

Returns: a new object with type S, a subtype of T
Overrides: object.__new__

centre(self, string, width=100)

source code 

Format the string to be centred to a certain number of spaces.

Parameters:
  • string (str) - The string to centre.
  • width (int) - The number of characters to centre to.
Returns: str
The centred string with leading whitespace added.

file_type(self, path)

source code 

Return a string representation of the file type.

Parameters:
  • path (str) - The full path of the file to return information about.
Returns: str
The single line file type information string.

format_max_width(self, data)

source code 

Return the text formatting width for the given data.

Parameters:
  • data (list) - The list of things to print out.
Returns: int
The maximum width of the elements in the list.

intro_text(self)

source code 

Create the introductory string for STDOUT printing.

This text is word-wrapped to a fixed width of 100 characters (or 80 on MS Windows).

Returns: str
The introductory string.

package_info(self)

source code 

Return a string for printing to STDOUT with info from the Python packages used by relax.

Returns: str
The info string.

ram_info(self, format=' %-25s%s\n')

source code 

Return a string for printing to STDOUT with info from the Python packages used by relax.

Parameters:
  • format (str) - The formatting string.
Returns: str
The info string.

relax_module_info(self)

source code 

Return a string with info about the relax modules.

Returns: str
The info string.

sys_info(self)

source code 

Return a string for printing to STDOUT with info about the current relax instance.

Returns: str
The info string.

win_arch(self)

source code 

Determine the MS Windows architecture.

Returns: str
The architecture string.