UtilBase — Base for all ADMIT utilities.

This module defines the UtilBase class.

class admit.util.UtilBase.UtilBase(**keyval)[source]

Defines the utility base class. All utility classes (e.g. Table, Line, etc) must inherit from this class. The class has the basic infrastructure for printing the class contents and setting variables. Utility classes do not have to have a write method as it is dynamically done by the xml writer.


keyval : dict

Dictionary containing the keyword value pairs of all arguments.


_type (str) String containing the type of the class.
_order (list) List containing the order to write out the data in, generated on initialization.


getkey(key) Method to get a data member by name
setkey([name, value]) set keys, two styles are possible:

Method to get a data member by name


key : str

The name of the data member to return


various, the contents of the requested item

setkey(name='', value='')[source]

set keys, two styles are possible:

  1. name = {key:val} e.g. setkey({“a”:1})
  2. name = “key”, value = val e.g. setkey(“a”, 1)

This method checks the type of the keyword value, as it must remain the same. Also new keywords cannot be added.


name : dictionary or string

Dictionary of keyword value pais to set or a string with the name of a single key

value : any

The value to change the keyword to