Skip to content

Instantly share code, notes, and snippets.

@tbaschak
Created April 6, 2014 07:39
Show Gist options
  • Save tbaschak/10002632 to your computer and use it in GitHub Desktop.
Save tbaschak/10002632 to your computer and use it in GitHub Desktop.
from ConfigParser import SafeConfigParser
parser = SafeConfigParser()
parser.read('etc/unifi.cfg')
username = parser.get('unifi', 'username')
password = parser.get('unifi', 'password')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment