Re: Best way to find starting directory

2013-03-20 Thread Dave Angel
On 03/20/2013 05:38 AM, Frank Millman wrote: On 20/03/2013 10:56, Dave Angel wrote: On 03/20/2013 01:58 AM, Frank Millman wrote: On 19/03/2013 17:03, Dave Angel wrote: Dave, I really appreciate your input, but we are talking at cross purposes somewhere along the line - I am not sure whe

Re: Best way to find starting directory

2013-03-20 Thread Frank Millman
On 20/03/2013 10:56, Dave Angel wrote: On 03/20/2013 01:58 AM, Frank Millman wrote: On 19/03/2013 17:03, Dave Angel wrote: On 03/19/2013 10:29 AM, Frank Millman wrote: On 19/03/2013 14:46, Dave Angel wrote: In putting them there, you are making two assumptions. One is that only one user w

Re: Best way to find starting directory

2013-03-20 Thread Dave Angel
On 03/20/2013 01:58 AM, Frank Millman wrote: On 19/03/2013 17:03, Dave Angel wrote: On 03/19/2013 10:29 AM, Frank Millman wrote: On 19/03/2013 14:46, Dave Angel wrote: In putting them there, you are making two assumptions. One is that only one user will ever run this, and two is that the u

Re: Best way to find starting directory

2013-03-19 Thread Frank Millman
On 19/03/2013 17:03, Dave Angel wrote: On 03/19/2013 10:29 AM, Frank Millman wrote: On 19/03/2013 14:46, Dave Angel wrote: As you say, there is a variety of types of data that one might to store externally. My current scenario is that, in my business/accounting application, I use xml to store f

Re: Best way to find starting directory

2013-03-19 Thread Dave Angel
On 03/19/2013 10:29 AM, Frank Millman wrote: On 19/03/2013 14:46, Dave Angel wrote: On 03/19/2013 04:21 AM, Frank Millman wrote: On 19/03/2013 09:55, Peter Otten wrote: Frank Millman wrote: I want to locate a file relative to the directory from which the main program was launched. I have fo

Re: Best way to find starting directory

2013-03-19 Thread Frank Millman
On 19/03/2013 14:46, Dave Angel wrote: On 03/19/2013 04:21 AM, Frank Millman wrote: On 19/03/2013 09:55, Peter Otten wrote: Frank Millman wrote: I want to locate a file relative to the directory from which the main program was launched. I have found two ways of finding the starting directory

Re: Best way to find starting directory

2013-03-19 Thread Dave Angel
On 03/19/2013 04:21 AM, Frank Millman wrote: On 19/03/2013 09:55, Peter Otten wrote: Frank Millman wrote: I want to locate a file relative to the directory from which the main program was launched. I have found two ways of finding the starting directory - 1. import os dir = os.getcwd() Thi

Re: Best way to find starting directory

2013-03-19 Thread Frank Millman
On 19/03/2013 09:55, Peter Otten wrote: Frank Millman wrote: I want to locate a file relative to the directory from which the main program was launched. I have found two ways of finding the starting directory - 1. import os dir = os.getcwd() This gives the current working directory... 2.

Re: Best way to find starting directory

2013-03-19 Thread Peter Otten
Frank Millman wrote: > I want to locate a file relative to the directory from which the main > program was launched. > > I have found two ways of finding the starting directory - > > 1. > import os > dir = os.getcwd() This gives the current working directory... > 2. > import os.path > import

Best way to find starting directory

2013-03-19 Thread Frank Millman
Hi all I want to locate a file relative to the directory from which the main program was launched. I have found two ways of finding the starting directory - 1. import os dir = os.getcwd() 2. import os.path import __main__ dir = os.path.dirname(__main__.__file__) I know that the first one wi