Re: [Tutor] Configuration File Pattern

2008-07-21 Thread Daniele
> What I use in this situation is the INI config file parser in the > standard lib. It's easy to use > > http://docs.python.org/lib/module-ConfigParser.html > Awesome! Really easy and intuitive. Thanks a lot ___ Tutor maillist - Tutor@python.org http:

Re: [Tutor] Configuration File Pattern

2008-07-21 Thread Lie Ryan
> Message: 9 > Date: Mon, 21 Jul 2008 16:08:45 +0200 > From: Daniele <[EMAIL PROTECTED]> > Subject: [Tutor] Configuration File Pattern > To: tutor@python.org > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=UTF-8 > > Hi list

Re: [Tutor] Configuration File Pattern

2008-07-21 Thread Chad Crabtree
What I use in this situation is the INI config file parser in the standard lib. It's easy to use ##CONFIG FILE [paths] images=/home/user/Images ##CODE### import ConfigParser config=ConfigParser.ConfigParser() config.readfp(open(conf,'r')) print config http://docs.python.org/lib/module-Con

[Tutor] Configuration File Pattern

2008-07-21 Thread Daniele
Hi list, I've recently developed a basic python program which needs to store some data in a file (e.g. a directory path). What the program needs is a dictionary containing the data, so I used the pickle module to store the dictionary in a file and read it back when the program is launched. I wanted