ConfigParser and .ini files

Mike Callahan mcalla at home.com
Sun Jan 23 21:14:29 EST 2000


On another note, while using ConfigParser I discovered that if you call the
read method with a file that does not exist, no error or exception is
returned. Is this an intended result? If so, is this a good idea? I know I
can get around this easily, I am just curious why no exception is raised.

for example:

>>> from ConfigParser import ConfigParser
>>> test = ConfigParser()
>>> test.read(['test.ini'])         # test.ini does not exist
>>>                                       # no error or traceback

Mike Callahan






More information about the Python-list mailing list