diff options
| author | Jason Albert <albertj@us.ibm.com> | 2015-03-16 15:02:11 -0500 |
|---|---|---|
| committer | Jason Albert <albertj@us.ibm.com> | 2015-03-16 15:02:11 -0500 |
| commit | 41e5dcaed0eb268efca567faf937eb2cd8760b80 (patch) | |
| tree | 92fbacaa1a145d8d7a4f2dd5877ab6ef1710438c /pymod | |
| parent | 62f854faae357bf8bcb09f8b9ce34aeb0272b466 (diff) | |
| download | vpdtools-41e5dcaed0eb268efca567faf937eb2cd8760b80.tar.gz vpdtools-41e5dcaed0eb268efca567faf937eb2cd8760b80.zip | |
Adding the out pymod that was missed from earlier checkins
Diffstat (limited to 'pymod')
| -rw-r--r-- | pymod/out.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pymod/out.py b/pymod/out.py new file mode 100644 index 0000000..57f0640 --- /dev/null +++ b/pymod/out.py @@ -0,0 +1,37 @@ +# Jason Albert - created 03/06/2014 +# Python module to define common output functions + +############################################################ +# Imports - Imports - Imports - Imports - Imports - Imports +############################################################ +import os +import cmdline + +############################################################ +# Variables - Variables - Variables - Variables - Variables +############################################################ +class VarBox: + pass + +__m = VarBox() +__m.indent = 0 + +############################################################ +# Function - Functions - Functions - Functions - Functions +############################################################ +# Common function for error printing +def error(message): + print((' ' * __m.indent) + ("ERROR: %s" % message)) + +# Common function for debug printing +def debug(message): + print((' ' * __m.indent) + ("DEBUG: %s" % message)) + +def msg(message): + print((' ' * __m.indent) + message) + +def setIndent(num): + """ + Sets the output indent on all printed lines + """ + __m.indent = num |

