Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

baseobj(1) [centos man page]

BASEOBJ(1)							   baseobj 1.0.1							BASEOBJ(1)

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 log- ging 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 expression 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 messages (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 set- ting 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 ( NFStest 1.0.2 10 April 2013 BASEOBJ(1)

Check Out this Related Man Page

ncpd(8) 						  System administration commands						   ncpd(8)

ncpd - Daemon which handles the serial link to a Psion SYNOPSIS
ncpd [-V] [-h] [-v log-class] [-d] [-e] [-p [host:]port] [-s device] [-b baud-rate] [long-options] DESCRIPTION
ncpd is the daemon which handles the serial link to your Psion. It listens at port 7501 for local connections and provides basic PLP/NCP services for plpfuse and plpftp and other front-ends. It auto-connects to the psion, even after unplugging/switching off therefore it can run all the time if you can dedicate a serial device to it. OPTIONS
-V, --version Display the version and exit -h, --help Display a short help text and exit. -e, --autoexit Exit automatically if the device is disconnected. Furthermore, use the current tty as I/O device. This option is intended for start- ing ncpd on demand using mgetty's auto-detect function. (A patch for mgetty is needed for that). -v, --verbose=log-class Increase the logging level of the program. the possible values for log-class are: nl Set NCP debug level to LOG nd Set NCP debug level to DEBUG ll Set Link debug level to LOG ld Set Link debug level to DEBUG pl Set Packet debug level to LOG pd Set Packet debug level to DEBUG ph Set Packet debug level to HANDSHAKE m Set overall debug level to verbose all Turn on all the above logging on. -d, --dontfork Do not background the daemon. -p, --port=[host:]port Specify the port to listen on - by default the value for the host is and the value for the port is looked up in /etc/ser- vices using the key psion/tcp. If it is not found there, a default value of 7501 is used. -s, --serial=device Specify the serial device to use to connect to the Psion - this defaults to /dev/ttyS0 -b, --baudrate=baud-rate Specify the baud rate to use for the serial connection. If the word auto is specified, ncpd cycles through baud-rates of 115200, 57600, 38400, 19200 and 9600 baud. Default setting is auto. SEE ALSO
plpfuse(8), plpprintd(8), plpftp(1), sisinstall(1) AUTHOR
Fritz Elfert Heavily based on p3nfsd by Rudolf Koenig ( and plp_1_7 by Philip Proudman (phil@proud- Patches from Matt Gumbley ( Man page by John Lines ( plptools 1.0.9 2008/03/13 ncpd(8)

Featured Tech Videos