Relative paths in mod_python
Ivo van der Sangen
i.g.j.v.d.sangen at student.tue.nl
Sun Mar 19 10:34:46 EST 2006
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 when I distribute the script; the
person using it will first have to modify it, which is not what I want. Is
it possible that a mod_python script has as current working directory
the directory where the script resides? At the moment os.getcwd()
returns '/'.
More information about the Python-list
mailing list