Re: Best way to store config or preferences in a multi-platform way

2008-05-05 Thread python
Lance, > I am still undecided if the ability for the user to edit the file > independently of the program is a good or bad thing. I prefer user viewable plain (non-XML) text files because: - easy to make a change in case of emergency - easy to visually review and search - easy to version contro

Re: Best way to store config or preferences in a multi-platform way.

2008-05-05 Thread python
Lance, > I am still undecided if the ability for the user to edit the file > independently of the program is a good or bad thing. I prefer user viewable plain (non-XML) text files because: - easy to make a change in case of emergency - easy to visually review and search - easy to version contro

Re: Best way to store config or preferences in a multi-platform way.

2008-05-02 Thread Carl Banks
On May 2, 12:30 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 01 May 2008 10:30:03 -0300, Nick Craig-Wood <[EMAIL PROTECTED]> > escribió: > > > As for where to store it, I use os.path.expanduser("~") to find the > > base directory and a bit of platform specific code. > > > Something

Re: Best way to store config or preferences in a multi-platform way.

2008-05-02 Thread Gabriel Genellina
En Thu, 01 May 2008 10:30:03 -0300, Nick Craig-Wood <[EMAIL PROTECTED]> escribió: As for where to store it, I use os.path.expanduser("~") to find the base directory and a bit of platform specific code. Something like this snippet self.is_windows = sys.platform == 'win32' self.home =

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Torsten Bronger
Hallöchen! Ivan Illarionov writes: > On Fri, 02 May 2008 01:21:38 +0200, Torsten Bronger wrote: > >> [...] >> >> In contrast to many other areas of software, configuration files >> needn't be compatible with anything except the user's brain. So >> even if the rest of the world uses config forma

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Carl Banks
On May 1, 7:54 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > No, all I want is to give the OP a useful alternative Fair enough, I can't argue with that. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Fri, 02 May 2008 01:21:38 +0200, Torsten Bronger wrote: > Hallöchen! > > Ivan Illarionov writes: > >> [...] >> >> For me it looks more like an old-school/new-school thing than use-case >> thing. I may be wrong, but I see more and more new projects use things >> like reST and YAML/JSON and it

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 16:32:00 -0700, Carl Banks wrote: > On May 1, 4:50 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> On Thu, 01 May 2008 11:56:20 -0700, Carl Banks wrote: >> > On May 1, 1:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> >> On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wro

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Carl Banks
On May 1, 4:50 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On Thu, 01 May 2008 11:56:20 -0700, Carl Banks wrote: > > On May 1, 1:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > >> On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wrote: > >> > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Torsten Bronger
Hallöchen! Ivan Illarionov writes: > [...] > > For me it looks more like an old-school/new-school thing than > use-case thing. I may be wrong, but I see more and more new > projects use things like reST and YAML/JSON and it feels like they > are gradually replacing traditional old-school solution

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 23:03:38 +0200, Torsten Bronger wrote: > Hallöchen! > > Ivan Illarionov writes: > >> [...] >> >> I took the example from >> http://www.kuro5hin.org/story/2004/10/29/14225/062 I haven't use my own >> example only because I don't have one at hand right now. YAML, in its >> simp

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Torsten Bronger
Hallöchen! Ivan Illarionov writes: > [...] > > I took the example from > http://www.kuro5hin.org/story/2004/10/29/14225/062 I haven't use > my own example only because I don't have one at hand right > now. YAML, in its simple form, definetely makes me more > productive. I wasted too much time wit

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 11:56:20 -0700, Carl Banks wrote: > On May 1, 1:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wrote: >> > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: >> >> On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wr

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 14:13:08 -0500, Jon Ribbens wrote: > On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> I used XML files before for this purpose and found YAML much easier and >> better suitable for the task. >> >> Please explain why don't like YANL so much? > > Because even the exa

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread tinnews
Carl Banks <[EMAIL PROTECTED]> wrote: > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: > > On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > IMO .ini-like config files are from the stone age. The modern approach is > > > to use YAML (http://www.yaml.org). > > > > You m

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Micah Elliott
On 2008-05-01 Carl Banks wrote: > If you don't intend to write a GUI to do that, write a simple > text file parser (if the options are simple), use ConfigParser, > or use a Python file that you exec. INI is great for so many things. It is also extremely commonplace, regardless of platform. The

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Jon Ribbens
On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > I used XML files before for this purpose and found YAML much easier and > better suitable for the task. > > Please explain why don't like YANL so much? Because even the examples in the spec itself are unreadable gibberish. The PyYAML lib

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Carl Banks
On May 1, 1:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wrote: > > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: > >> On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > >> > IMO .ini-like config files are from the stone

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Matimus
On May 1, 4:37 am, Lance Gamet <[EMAIL PROTECTED]> wrote: > Hi, python beginner starting a new project here. > > This project will store most of its actual data in a shared-database, but > I have a small amount of user specific data that I need to be stored like > configuration or preferences for e

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Patrick Mullen
YAML is a joke if you expect a windows user to be able to hand edit the data. Windows users typically expect a .ini file in the application's directory. (Usually not the users home directory, even if that may be a better location). XML is ok, but .ini is much preferred. If you have a configurat

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wrote: > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: >> On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> >> > IMO .ini-like config files are from the stone age. The modern >> > approach is to use YAML (http://www.yaml.org).

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 11:11:29 -0500, Jon Ribbens wrote: > On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> IMO .ini-like config files are from the stone age. The modern approach >> is to use YAML (http://www.yaml.org). > > You mean YAML isn't a joke!? It's so ludicrously overcomplicate

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Carl Banks
On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: > On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > IMO .ini-like config files are from the stone age. The modern approach is > > to use YAML (http://www.yaml.org). > > You mean YAML isn't a joke!? It's so ludicrously overcomp

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Jon Ribbens
On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > IMO .ini-like config files are from the stone age. The modern approach is > to use YAML (http://www.yaml.org). You mean YAML isn't a joke!? It's so ludicrously overcomplicated, and so comprehensively and completely fails to achieve its

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 08:30:03 -0500, Nick Craig-Wood wrote: > Lance Gamet <[EMAIL PROTECTED]> wrote: >> This project will store most of its actual data in a shared-database, >> but I have a small amount of user specific data that I need to be >> stored like configuration or preferences for examp

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Nick Craig-Wood
Lance Gamet <[EMAIL PROTECTED]> wrote: > This project will store most of its actual data in a shared-database, but > I have a small amount of user specific data that I need to be stored like > configuration or preferences for example, the list of databases that the > program should connect t

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Diez B. Roggisch
Lance Gamet schrieb: Hi, python beginner starting a new project here. This project will store most of its actual data in a shared-database, but I have a small amount of user specific data that I need to be stored like configuration or preferences for example, the list of databases that the pr

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Brian Vanderburg II
Lance Gamet wrote: Hi, python beginner starting a new project here. This project will store most of its actual data in a shared-database, but I have a small amount of user specific data that I need to be stored like configuration or preferences for example, the list of databases that the prog

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread M.-A. Lemburg
On 2008-05-01 13:37, Lance Gamet wrote: Hi, python beginner starting a new project here. This project will store most of its actual data in a shared-database, but I have a small amount of user specific data that I need to be stored like configuration or preferences for example, the list of dat

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Jeff
Look at the pickle and marshal modules. -- http://mail.python.org/mailman/listinfo/python-list