File: config.py

package info (click to toggle)
voctomix 1.3-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 3,368 kB
  • sloc: python: 4,958; sh: 733; makefile: 23
file content (16 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os.path
from configparser import SafeConfigParser

__all__ = ['Config']

modulepath = os.path.dirname(os.path.realpath(__file__))
files = [
    os.path.join(modulepath, '../default-config.ini'),
    os.path.join(modulepath, '../config.ini'),
    '/etc/voctomix/voctomidi.ini',
    '/etc/voctomidi.ini',
    os.path.expanduser('~/.voctopanel.ini'),
]

Config = SafeConfigParser()
Config.read(files)