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
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
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
>
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
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