1 Documentation for module szstoolbox.
6 """A general Exception which can be used/inherited
10 """ all functions to give messages to whatever """
12 usage: """ prints a helpmessage to stdout
13 Usage: msg.usage([modulename [, moduletext]])
16 help: """ prints debugmessages if lvl >= debuglvl
17 Usage: debug(message, lvl, source [, x=0])
18 Returns: cache if x != 0 else True """
20 debug: """ prints debugmessages if lvl >= debuglvl
21 Usage: debug(message, lvl, source [, x=0])
22 Returns: cache if x != 0 else True """
24 say: """ parses the languagefiles and give the right text
25 Usage: msg.say(dict, msgcode)
26 Returns: the message in right language """
28 log: """ sends messages to the configured logfile
29 should only used by msg.debug """
33 """ functions for reading and writing the config """
35 settings: """ returns the actual settings
37 Returns: ['value','group','cfgF path'] """
39 read: """ reads the configurationfile and returns the values
40 Usage: cfg.read(value)
41 Returns: whats inside value """
43 write: """ this function does nothing at the moment
44 in future it writes into the configfiles """
48 """ some extra functions like counters """
50 countadd: """ counter for addition
51 Usage: xtra.countadd([y [,x ]])
52 where y (standard 1) is the value to add to x
53 Returns: the new value of x """
55 countsub: """ counter for substraction
56 Usage: xtra.countsub([y ],x ]),
57 where y (standard 1) is the value to substract
59 Returns: the new value of x """
61 strrotate: """ trying to build a string rotator
62 Usage: xtra.strrotate(str, length)
63 where 'str' is the String to rotate in 'length' units
64 Returns: part of str """
65 ATTENTION: this function is untested, bugreports
66 and suggestions are desired
68 savevar: """ saves variables in the cache, so your module
69 can use it later again...
70 Usage: xtra.savevar(name, value)
73 getvar: """ returns the value of name
74 Usage: xtra.getvar(name)
75 Returns: value of name """
77 delvar: """ deletes the variable from list
78 Usage: xtra.delvar(name)
82 Global variables in szstoolbox:
84 global cfgF: name of configuration file
85 global langF: name of language file
86 global langmod: alias for imported language module
87 global logfile: name of log file
88 global language: name of the language (eg 'en' or 'de')
89 global accuracy: accuracy (positions after decimal point)
90 global interval: renew time
91 global debuglevel: debuglevel
92 global cfgG: cfg('global')
93 global starttime: secs since epoch where the script was started
94 global kernel_version: Linux Kernel version