import ConfigParser import os config = ConfigParser.ConfigParser() config.read(os.getcwd() + '/utils/settings.cfg')This made me scratch my head for a while! Gives you errors when you assume it to use relative paths.
File "/usr/lib64/python2.4/ConfigParser.py", line 511, in get raise NoSectionError(section) ConfigParser.NoSectionError: No section: 'config'
No comments:
Post a Comment