Skip to content

Instantly share code, notes, and snippets.

@davewalk
Last active August 29, 2015 14:01
Show Gist options
  • Save davewalk/b9aa96034f105443c148 to your computer and use it in GitHub Desktop.
Save davewalk/b9aa96034f105443c148 to your computer and use it in GitHub Desktop.
Python standard config module
[login]
password = abc123
from ConfigParser import SafeConfigParser
parser = SafeConfigParser()
parser.read('thefile.cfg')
password = parser.get('login', 'password')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment