ConfigParser - print config.sections() returns []
问题 I'm trying to use a ConfigParser module to parse an *.ini file. The problem is that when I try to print sections or whatever, it returns empty list [] . config.ini [SERVER] host=localhost port=9999 max_clients=5 [REGULAR_EXPRESSIONS] regular_expressions_file_path=commands/commands_dict config.py # -*- coding: utf-8 -*- import ConfigParser config = ConfigParser.SafeConfigParser() config.read("config.ini") print config.sections() [] Do you know where is the problem? EDIT: Here is a screen of my