Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-24 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Steven D'Aprano wrote: Putting preferences files in the user's top level directory is horribly inconvenient for the user. There is a way around this: redefine the HOME environment variable to be the directory where you want the dotfiles to end up. --

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-24 Thread Paul McNett
Steven D'Aprano wrote: On Sun, 19 Oct 2008 20:50:46 +0200, Stef Mientki wrote: Duncan, in windows it's begin to become less common to store settings in DocsSettings, because these directories are destroyed by roaming profiles The directories aren't destroyed by roaming profiles. When the

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-23 Thread Robert Brown
Stef Mientki [EMAIL PROTECTED] writes: I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I can think of something like: - use a relative path if drive is identical to the application (I'm still a Windows guy) - use some kind of OS-dependent translation table if on

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-22 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Ross Ridge wrote: Ross Ridge wrote: As opposed to the file system being the single point failure? Lawrence D'Oliveiro [EMAIL PROTECTED] wrote: The file system is involved regardless. But leaving out an additional layer of failure on top of it does make things

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-22 Thread Steven D'Aprano
On Tue, 21 Oct 2008 10:00:35 -0500, Grant Edwards wrote: It is true that all kinds of programs will create .app files in your home dir which is not very polite. It _is_ polite. Polite means following the established rules and doing what's expected of you. That's exactly what is expected

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-22 Thread Joe Strout
On Oct 22, 2008, at 10:00 PM, Steven D'Aprano wrote: It would have been easy to avoid this: just copy the relevant bits of the / directory hierarchy in the user's home directory. Global settings go in /etc and per user settings go in ~/etc. Global temp files go into / tmp and per user temp

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-21 Thread Roel Schroeven
Steven D'Aprano schreef: On Mon, 20 Oct 2008 10:20:06 +, Duncan Booth wrote: Steven D'Aprano [EMAIL PROTECTED] wrote: On Sun, 19 Oct 2008 15:40:32 +, Duncan Booth wrote: Steven D'Aprano [EMAIL PROTECTED] wrote: In Linux, config files should go into: ~/.appname/ or /etc/appname/

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-21 Thread Laszlo Nagy
However, the normal place to store settings on Windows is in the registry. Which becomes a single point of failure for the whole system. LOL :-) BTW famous big popular programs like firefox and thunderbird will store their configuration data under Documents and Settings\Application

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-21 Thread Steven D'Aprano
On Tue, 21 Oct 2008 11:32:14 +0200, Laszlo Nagy wrote: Users who like to go inside Documents and Settings\Application data and delete things without knowing what they do deserve to have a malfunctioning system for sure. The worst consequence from deleting a settings file should be to revert

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-21 Thread Ross Ridge
Ross Ridge wrote: However, the normal place to store settings on Windows is in the registry. Lawrence D'Oliveiro [EMAIL PROTECTED] wrote: Which becomes a single point of failure for the whole system. As opposed to the file system being the single point failure?

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-21 Thread Grant Edwards
On 2008-10-21, Laszlo Nagy [EMAIL PROTECTED] wrote: However, the normal place to store settings on Windows is in the registry. Which becomes a single point of failure for the whole system. LOL :-) BTW famous big popular programs like firefox and thunderbird will store their

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-21 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Ross Ridge wrote: Lawrence D'Oliveiro [EMAIL PROTECTED] wrote: Ross Ridge wrote: However, the normal place to store settings on Windows is in the registry. Which becomes a single point of failure for the whole system. As opposed to the file system being

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-21 Thread Ross Ridge
Ross Ridge wrote: As opposed to the file system being the single point failure? Lawrence D'Oliveiro [EMAIL PROTECTED] wrote: The file system is involved regardless. But leaving out an additional layer of failure on top of it does make things more robust, yes. No, that doesn't follow. Having

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Duncan Booth
Steven D'Aprano [EMAIL PROTECTED] wrote: On Sun, 19 Oct 2008 15:40:32 +, Duncan Booth wrote: Steven D'Aprano [EMAIL PROTECTED] wrote: In Linux, config files should go into: ~/.appname/ or /etc/appname/ In Windows (which versions?) then should go into the Documents And Settings

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Ross Ridge
Stef Mientki wrote: Duncan, in windows it's begin to become less common to store settings in DocsSettings, because these directories are destroyed by roaming profiles (a big reason why I can't run Picassa ;-( It's more common to follow the portable apps approach, store them in the application

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Steven D'Aprano
On Sun, 19 Oct 2008 20:50:46 +0200, Stef Mientki wrote: Duncan, in windows it's begin to become less common to store settings in DocsSettings, because these directories are destroyed by roaming profiles (a big reason why I can't run Picassa ;-( It's more common to follow the portable apps

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Steven D'Aprano
On Mon, 20 Oct 2008 10:20:06 +, Duncan Booth wrote: Steven D'Aprano [EMAIL PROTECTED] wrote: On Sun, 19 Oct 2008 15:40:32 +, Duncan Booth wrote: Steven D'Aprano [EMAIL PROTECTED] wrote: In Linux, config files should go into: ~/.appname/ or /etc/appname/ In Windows (which

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Cousin Stanley
[2] And they are right to do so. Programs that dump config files and directories, hidden or not, in the top level of the user's home directory are incredibly rude. It may have been a Unix standard for as long as there has been a Unix, but it's still the programming equivalent of coming

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Bruno Desthuilliers
Eric Wertman a écrit : I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I'm in agreement that perfect probably isn't applicable. If I were doing this myself, I might store the information in a tuple: base = 'some root structure ('/' or 'C') make it C:\ path =

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Stef Mientki
Bruno Desthuilliers wrote: Eric Wertman a écrit : I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I'm in agreement that perfect probably isn't applicable. If I were doing this myself, I might store the information in a tuple: base = 'some root structure ('/' or

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Steven D'Aprano
On Mon, 20 Oct 2008 23:56:22 +0200, Stef Mientki wrote: Bruno Desthuilliers wrote: Eric Wertman a écrit : I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I'm in agreement that perfect probably isn't applicable. If I were doing this myself, I might store the

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Eric Wertman
Do you really think there are Linux or Mac systems with a C: drive? This whole question is based on the ludicrous assumption that general file system paths can be platform-independent. That's a bit like trying to write code that is programming language-independent. That's sort of where I

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Stef Mientki wrote: I (again) wonder what's the perfect way to store, OS-independent, filepaths ? URLs beginning file://. -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Ross Ridge wrote: However, the normal place to store settings on Windows is in the registry. Which becomes a single point of failure for the whole system. -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Steven D'Aprano wrote: Do you really think there are Linux or Mac systems with a C: drive? And what about files on Dimdows systems kept on a drive other than C? This whole question is based on the ludicrous assumption that general file system paths can be

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-20 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Steven D'Aprano wrote: And 75% [1] of average Windows users will either delete the file, move it to a more convenient[2] location, or edit the file name to remove the dot. Doesn't seem very likely to me. Experienced Dimdows users would well know that stuffing

What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Stef Mientki
hello, I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I can think of something like: - use a relative path if drive is identical to the application (I'm still a Windows guy) - use some kind of OS-dependent translation table if on another drive - use ? if on a

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread [EMAIL PROTECTED]
On Oct 19, 8:35 am, Stef Mientki [EMAIL PROTECTED] wrote: I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I don't think there is any such thing. What problem are you trying to solve? -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 14:35:01 +0200, Stef Mientki wrote: hello, I (again) wonder what's the perfect way to store, OS-independent, filepaths ? Perfect? I can't imagine any scheme which will work on every imaginable OS, past present and future. However, in practice I think there are two

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Duncan Booth
Steven D'Aprano [EMAIL PROTECTED] wrote: In Linux, config files should go into: ~/.appname/ or /etc/appname/ In Windows (which versions?) then should go into the Documents And Settings folder, where ever that is. There's no single string which can represent both of these conventions!

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Duncan Booth
Steven D'Aprano [EMAIL PROTECTED] wrote: import os os.path.splitdrive('C://My Documents/My File.txt') ('C:', 'My Documents\\My File.txt') I had to fake the above output because I'm not running Windows, so excuse me if I got it wrong. Not that it matters, but:

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Grant Edwards
On 2008-10-19, Stef Mientki [EMAIL PROTECTED] wrote: I (again) wonder what's the perfect way to store, OS-independent, filepaths ? The question appears to me to be meaningless. File paths are not OS independant, so an OS-independant way to store them doesn't seem to be a useful thing to talk

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Eric Wertman
I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I'm in agreement that perfect probably isn't applicable. If I were doing this myself, I might store the information in a tuple: base = 'some root structure ('/' or 'C') path = ['some','set','of','path','names']

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Stef Mientki
Eric Wertman wrote: I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I'm in agreement that perfect probably isn't applicable. If I were doing this myself, I might store the information in a tuple: base = 'some root structure ('/' or 'C') path =

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Aaron Brady
Duncan Booth wrote: Steven D'Aprano [EMAIL PROTECTED] wrote: In Linux, config files should go into: ~/.appname/ or /etc/appname/ In Windows (which versions?) then should go into the Documents And Settings folder, where ever that is. There's no single string which can represent both

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 15:40:32 +, Duncan Booth wrote: Steven D'Aprano [EMAIL PROTECTED] wrote: In Linux, config files should go into: ~/.appname/ or /etc/appname/ In Windows (which versions?) then should go into the Documents And Settings folder, where ever that is. There's no

Re: What's the perfect (OS independent) way of storing filepaths ?

2008-10-19 Thread Steven D'Aprano
On Sun, 19 Oct 2008 20:50:46 +0200, Stef Mientki wrote: Duncan, in windows it's begin to become less common to store settings in DocsSettings, because these directories are destroyed by roaming profiles Isn't *everything* destroyed by roaming profiles? *wink* Seriously, I don't know anyone