Re: Help with paths

2010-10-18 Thread Devin M
On Oct 18, 2:43 pm, Alexander Kapps wrote: > On 18.10.2010 23:24, Devin M wrote: > > > Hello, I am using os.path to get the absolute paths of a few > > directories that some python files are in. > > FIlePath = os.path.dirname(os.path.realpath(__file__)) > > which returns a path similar to /home/de

Re: Help with paths

2010-10-18 Thread Alexander Kapps
On 18.10.2010 23:24, Devin M wrote: Hello, I am using os.path to get the absolute paths of a few directories that some python files are in. FIlePath = os.path.dirname(os.path.realpath(__file__)) which returns a path similar to /home/devinm/project/files Now I want to get the directory above this

Re: Help with paths

2010-10-18 Thread Emile van Sebille
On 10/18/2010 2:24 PM Devin M said... Hello, I am using os.path to get the absolute paths of a few directories that some python files are in. FIlePath = os.path.dirname(os.path.realpath(__file__)) which returns a path similar to /home/devinm/project/files Now I want to get the directory above thi

Re: Help with paths

2010-10-18 Thread Chris Rebert
On Mon, Oct 18, 2010 at 2:24 PM, Devin M wrote: > Hello, I am using os.path to get the absolute paths of a few > directories that some python files are in. > FIlePath = os.path.dirname(os.path.realpath(__file__)) > which returns a path similar to /home/devinm/project/files > Now I want to get the

Re: Help with paths

2010-10-18 Thread Andreas Waldenburger
On Mon, 18 Oct 2010 17:29:11 -0400 Andreas Waldenburger wrote: > On Mon, 18 Oct 2010 14:24:39 -0700 (PDT) Devin M > wrote: > [snip] > > Maybe os.relpath("..", FilePath) ? Python > 2.6 only. > Gah! I should learn to copy&paste more. Obviously it's the second one (os.path.relpath), not the first

Re: Help with paths

2010-10-18 Thread Andreas Waldenburger
On Mon, 18 Oct 2010 14:24:39 -0700 (PDT) Devin M wrote: > Hello, I am using os.path to get the absolute paths of a few > directories that some python files are in. > FIlePath = os.path.dirname(os.path.realpath(__file__)) > which returns a path similar to /home/devinm/project/files > Now I want to

Help with paths

2010-10-18 Thread Devin M
Hello, I am using os.path to get the absolute paths of a few directories that some python files are in. FIlePath = os.path.dirname(os.path.realpath(__file__)) which returns a path similar to /home/devinm/project/files Now I want to get the directory above this one. (/home/devinm/ project/) Is there