Created
December 26, 2012 16:30
-
-
Save tsileo/4381281 to your computer and use it in GitHub Desktop.
get_conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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