Source code for uw.local.config
"""Simple password configuration.
This module provides a ConfigParser for ~/.odyssey_pw in order to allow
storing non-Postgres credentials outside of program code.
"""
import os
import pwd
import configparser
[docs]def read_config ():
filename = '%s/.odyssey_pw' % pwd.getpwuid (os.getuid ()).pw_dir
config = configparser.RawConfigParser ()
config.read (filename)
return config