summaryrefslogtreecommitdiff
path: root/example-scripts/voctomidi/lib/config.py
blob: 44dd8dafdc1fff90887ab7e7cf75a9eed9ec70ff (plain)
  1. import os.path
  2. from configparser import SafeConfigParser
  3. __all__ = ['Config']
  4. modulepath = os.path.dirname(os.path.realpath(__file__))
  5. files = [
  6. os.path.join(modulepath, '../default-config.ini'),
  7. os.path.join(modulepath, '../config.ini'),
  8. '/etc/voctomix/voctomidi.ini',
  9. '/etc/voctomidi.ini',
  10. os.path.expanduser('~/.voctomidi.ini'),
  11. ]
  12. Config = SafeConfigParser()
  13. Config.read(files)