Re: [Tutor] Writing a Configuration Facility for an Application

2009-01-30 Thread Wayne Watson
Title: Signature.html That's plenty of food for thought. Thanks to all. I'll see if I can absorb it in the next 36 hours. After that, I'll be out of town for 3 days. Kent Johnson wrote: On Fri, Jan 30, 2009 at 8:57 AM, A.T.Hofkamp wrote: Kent Johnson wrote: Anoth

Re: [Tutor] Writing a Configuration Facility for an Application

2009-01-30 Thread Kent Johnson
On Fri, Jan 30, 2009 at 8:57 AM, A.T.Hofkamp wrote: > Kent Johnson wrote: >> >> Another way is to use a .ini file. The ConfigParser module can read >> ini files but not write them. >> http://docs.python.org/library/configparser.html > > What do you mean 'not write them'? > > > from the Python docs

Re: [Tutor] Writing a Configuration Facility for an Application

2009-01-30 Thread spir
Le Fri, 30 Jan 2009 14:17:34 +0100, Willi Richert a écrit : > Hi, > > I have often found that just initializing all the necessary stuff in one > Configuration.py module. You just import it and it works. I support this as it's far the most straightforward way! Now, depending on the actual use,

Re: [Tutor] Writing a Configuration Facility for an Application

2009-01-30 Thread A.T.Hofkamp
Kent Johnson wrote: Another way is to use a .ini file. The ConfigParser module can read ini files but not write them. http://docs.python.org/library/configparser.html What do you mean 'not write them'? from the Python docs: RawConfigParser.write(fileobject) Write a representation of the

Re: [Tutor] Writing a Configuration Facility for an Application

2009-01-30 Thread Willi Richert
Hi, I have often found that just initializing all the necessary stuff in one Configuration.py module. You just import it and it works. If you like the Windows .ini format, ConfigParser is your friend (http://docs.python.org/library/configparser.html). Regards, wr On Freitag, 30. Januar 2009 1

Re: [Tutor] Writing a Configuration Facility for an Application

2009-01-30 Thread Kent Johnson
On Fri, Jan 30, 2009 at 7:40 AM, Wayne Watson wrote: > I'm about to provide a config file for an application I've been working > with. > I suspect there may be a standard way of doing this in Python that relies on > more complex operations that simplify matters than just reading the file one > li

Re: [Tutor] Writing a Configuration Facility for an Application

2009-01-30 Thread A.T.Hofkamp
Wayne Watson wrote: mask file: c:\operation/horizon.jpg latitutde: -140.22 longitude 38.22 start time: 18:25:00 stop time: 06:30:00 event directory: d:\events_2009 grey scale: yes autoexpose format: gif I suspect there may be a standard way of doing this in Python that relies on more complex o

[Tutor] Writing a Configuration Facility for an Application

2009-01-30 Thread Wayne Watson
Title: Signature.html I'm about to provide a config file for an application I've been working with. One can set a number of values via the GUI during the use of the program only to see the settings disappear when restarted. Fortunately, most of the time the program runs for days.  Nevertheless,