How do I check if the python debug option is set from within a script -


If I'm in debug mode, then I want to do other stuff whenever I'm not.

  If DEBUG: STORED_DATA_FILE = os.path.join (TEMP_DIR, 'store.dat') LOG_LEVEL = logging.DEBUG print "debug mode" and: STORED_DATA_FILE = os.path.join (SCRIPT_PATH) , 'Store.dat') LOG_LEVEL = logging.INFO print "debug mode not"  

then:

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -