Skip to content

Instantly share code, notes, and snippets.

@tsileo
Created December 26, 2012 16:30
Show Gist options
  • Save tsileo/4381281 to your computer and use it in GitHub Desktop.
Save tsileo/4381281 to your computer and use it in GitHub Desktop.
get_conf
import yaml
import os
def get_conf():
config_file = os.path.dirname(__file__) + "./config.yml"
if os.path.isfile(config_file):
with open(config_file, "r") as f:
return yaml.load(f)
return {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment