Am working on a command line python script - throughout the script, I have a lot of information I am print-ing to the terminal window so that I may follow along with what is happening.
Using OptionParser I want to add a --quiet option so I can silence all the output. I am looking for a pythonic way to go about implementing this throughout the script so that I don't end up doing something like:
if not QUIET: # global variable set by OptionParser
print " my output "
Am new to python and sure there is a better way. Ideas?