ConfigParser is not parsing
felix gao
gre1600 at gmail.com
Fri Feb 12 21:18:26 EST 2010
Hi all,
I am trying to get the some configuration file read in by Python, however,
after the read command it return a list with the filename that I passed in.
what is going on?
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ConfigParser
>>> p = ConfigParser.SafeConfigParser()
>>> cfg = p.read("S3Files.conf")
>>> cfg
['S3Files.conf']
cat S3Files.conf
[main]
taskName=FileConfigDriver
lastProcessed=2010-01-31
dateFromat=%Y-%m-%d
skippingValue=86400
skippingInterval=seconds
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100212/deb52d82/attachment.html>
More information about the Python-list
mailing list