Parsing files

Skip Montanaro skip at pobox.com
Tue Feb 10 08:33:34 EST 2004


    Rob> Does anyone know of a neat way to read-in config files? At the
    Rob> moment I'm using the ConfigParser module but I have to add sections
    Rob> to the config file to make it parseable ie

    ...

In what way does the file not parse if the section is not available?  If you
need default values, take a look at the Options.py module which is part of
Spambayes:

    http://cvs.sourceforge.net/viewcvs.py/spambayes/spambayes/spambayes/Options.py?rev=1.104

Skip




More information about the Python-list mailing list