[mod_python] Scripts executed in /

Daniel Raneland raniz at gmx.net
Wed Jan 19 08:07:28 EST 2005


I noticed that all my scripts are run in / and not in the directory where the 
script resides...

A simple os.listdir( '.' ) returned this:
['bin', 'dev', 'etc', 'lib', 'mnt', 'opt', 'tmp', 'sys', 'var', 'usr', 'boot', 
'home', 'proc', 'sbin', 'root', 'stage1-x86-2004.3.tar.bz2', '.viminfo', 
'.bash_history', '.reiserfs_priv']

This causes some problems... such as not being able to import files in the 
same dir as the script, and not being able to open files and directories 
without giving an absolute path.

Is there any way to change this via a configuration setting or is it 
hard-coded into mod_python?


More information about the Mod_python mailing list