Skip to content

Instantly share code, notes, and snippets.

@snanda85
snanda85 / gist:3096523
Created July 12, 2012 07:50
Reading config from a python module instead of a separate configuation format
# config.py
arg1 = 5
arg2 = 6
# utils.py
import config
def read_config(arg, default_value=None):
return getattr(config, arg, default_value)
# myapp.py