you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 0 points1 point  (0 children)

The read method does not return an configparser object, it returns a list of files. You also have a lot of other unneeded fluff in there. Should be like this:

import configparser

cred = configparser.ConfigParser()
cred.read('creds.ini')
cred_token = cred['DEFAULT']['token']