Re: Relative paths in mod_python

2006-03-20 Thread Ivo van der Sangen
On 2006-03-19, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Ivo van der Sangen a écrit : >> I was wondering if I could use relative paths in a mod_python script. At >> the moment I am defining a constant string >> "/path/to/dir/where/script/resides". The problem with this is that when >> I mov

Re: Relative paths in mod_python

2006-03-19 Thread Steve Holden
Ivo van der Sangen wrote: > I was wondering if I could use relative paths in a mod_python script. At > the moment I am defining a constant string > "/path/to/dir/where/script/resides". The problem with this is that when > I move the script including files I use to get metadata I have to change > th

Re: Relative paths in mod_python

2006-03-19 Thread Bruno Desthuilliers
Ivo van der Sangen a écrit : > I was wondering if I could use relative paths in a mod_python script. At > the moment I am defining a constant string > "/path/to/dir/where/script/resides". The problem with this is that when > I move the script including files I use to get metadata I have to change >

Re: Relative paths in mod_python

2006-03-19 Thread Jochem Berndsen
Ivo van der Sangen wrote: > I was wondering if I could use relative paths in a mod_python script. At > the moment I am defining a constant string > "/path/to/dir/where/script/resides". > [snip] You can use Python's built-in __file__ variable. It is set to the absolute location of your script. You

Relative paths in mod_python

2006-03-19 Thread Ivo van der Sangen
I was wondering if I could use relative paths in a mod_python script. At the moment I am defining a constant string "/path/to/dir/where/script/resides". The problem with this is that when I move the script including files I use to get metadata I have to change this variable. The same problem occurs