baseobj man page on RedHat

Man page or keyword search:  
man Server   29550 pages
apropos Keyword Search (all sections)
Output format
RedHat logo
[printable version]

BASEOBJ(1)			 baseobj 1.0.1			    BASEOBJ(1)

NAME
       baseobj - Base object

DESCRIPTION
       Base class so objects will inherit the methods which provide the string
       representation of the object and methods to  change  the	 verbosity  of
       such  string  representation.  It also includes a simple debug printing
       and logging mechanism including methods to change the  debug  verbosity
       level and methods to add debug levels.

CLASSES
   class BaseObj(__builtin__.object)
       Base class so objects will inherit the methods which provide the string
       representation of the object and a simple debug	printing  and  logging
       mechanism.

       Methods defined here:
       ---------------------

       __init__(self, *kwts, **kwds)
	      Constructor

	      Initialize  object's  private  data  according  to the arguments
	      given

	      Examples:
		  # Named arguments
		  x = BaseObj(a=1, b=2)

		  # Dictionary argument
		  x = BaseObj({'a':1, 'b':2})

		  # Tuple arguments: first for keys and second for the values
		  x = BaseObj(['a', 'b'], [1, 2])

		  # All	 of  the  above	 will  create  an  object  having  two
	      attributes:
		  x.a = 1 and x.b = 2

       __repr__(self)
	      String representation of object

	      The   representation   depends  on  the  verbose	level  set  by
	      debug_repr().  If set to 0 the generic object representation  is
	      returned,	 else  the  representation  of the object includes all
	      object attributes and their values with proper indentation.

       __str__ = __repr__(self)

       close_log(self)
	      Close log file.

       debug_level(self, level=0)
	      Set debug level mask.

	      level: Level to set. This could be a number or a string  expres‐
		     sion of names defined by debug_map()

	      Examples:
		  # Set level
		  x.debug_level(0xFF)

		  # Set level using expression
		  x.debug_level('all')
		  x.debug_level('debug ^ 1')

       dprint(self, level, msg, indent=0)
	      Print  debug  message  if	 level is allowed by the verbose level
	      given in debug_level().

       open_log(self, logfile)
	      Open log file.

       Static methods defined here:
       ----------------------------

       debug_map(bitmap, name='', disp='')
	      Add a debug mapping.

	      Generic debug levels map
		<bitmap>  <name>  <disp prefix>
		 0x000	  'none'
		 0x001	  'info'  'INFO: ' # Display info messages only
		 0x0FF	  'debug' 'DBG:	 ' # Display info and all  debug  mes‐
	      sages (0x02-0x80)
		>0x100	  user defined verbose levels

       debug_repr(level=None)
	      Return  or  set verbose level of object's string representation.
	      When setting the verbose level, return the verbose level	before
	      setting it.

	      level: Level of verbosity to set

       dindent(indent)
	      Set global indentation.

       write_log(data)
	      Write data to log file.

BUGS
       No known bugs.

AUTHOR
       Jorge Mora (mora@netapp.com)

NFStest 1.0.2			 10 April 2013			    BASEOBJ(1)
[top]

List of man pages available for RedHat

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net