I'm trying to use ConfigParser for the first time and I'm missing something. I have this code
import ConfigParser import datetime conf = ConfigParser.ConfigParser() conf.add_section('general') conf.set( 'general', 'revision', 0 ) conf.set( 'general', 'date', datetime.datetime.now().strftime("%Y-%m-%d") ) conf.set( 'general', 'currentsetname', '' ) conf.set( 'general', 'incrementalcount', 0 ) conf.add_section( "Hello world" ) conf.set( "Hello world", 'apa', 3298 ) print conf.sections() print conf.items('general') #for debug_repos in conf.sections(): # print debug_repos #, conf.items( debug_repos ) When I run this I get the following result ['Hello world', 'general'] Traceback (most recent call last): File "backup.py", line 15, in <module> print conf.items('general') File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py", line 557, in items for option in options] File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py", line 565, in _interpolate if "%(" in value: TypeError: argument of type 'int' is not iterable What am I missing with the items call? jem _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor