Next / Previous / Contents / TCC Help System / NM Tech homepage

29. class System: System information

Another small object to hold information about a system from the report parameters file.

hwscan3.py
# - - - - -   c l a s s   S y s t e m   - - - - -

class System:
    '''Represents one system from the report parameters file.

      Exports:
        System ( nodename, isServer, isLinux ):
          [ (name is the system's nodename as a string) and
            (isServer is 1 iff it is a server, else 0) and
            (isLinux is 1 iff it is a Linux-only system, else 0) ->
              return a new System object with those attributes ]
        .nodename:      [ as passed to constructor, read-only ]
        .isServer:      [ as passed to constructor, read-only ]
        .isLinux:       [ as passed to constructor, read-only ]
    '''
    def __init__ ( self, nodename, isServer, isLinux ):
        '''Constructor for the System object.'''
        self.nodename  =  nodename
        self.isServer  =  isServer
        self.isLinux   =  isLinux