# -*- coding: utf-8 -*- """Default config variables Don't overwrite here, because this file is in the version control Create a localconfig.py file for your own deviating config variables. There you can overwrite the variables defined here, and define additional ones. """ import os import logging home = os.environ.get("HOME") OBJSIMPY_DIR = os.path.dirname(__file__) OBJSIM_DIR = os.path.normpath(os.path.join(OBJSIMPY_DIR, '..', '..')) MOVIE_DIR = os.path.join(OBJSIM_DIR, 'data', 'movies') SIMDATA_BASE_DIR = os.path.join(home, 'data', 'sim') TESTDATA_BASE_DIR = os.path.join(OBJSIMPY_DIR, '..', 'test', 'data') MIN_DELAY = 0.25 # For infos on logging see: # https://docs.python.org/2/howto/logging.html # http://victorlin.me/posts/2012/08/26/good-logging-practice-in-python # create logger logger = logging.getLogger('objsimpy') logger.setLevel(logging.ERROR) # create console handler and set level to debug ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) # create formatter formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') # add formatter to ch ch.setFormatter(formatter) # add ch to logger logger.addHandler(ch) try: from localconfig import * except ImportError: pass