I'm working on a mod_wsgi script.. at the beginning is:
sys.path.extend(map(os.path.abspath, ['/media/server/www/webroot/']))
But I've noticed, that every time I update the script the sys.path var keeps growing with duplicates of this extension:
['/usr/lib64/python25.zip'
'/usr/lib64/python2.5'
'/usr/lib64/python2.5/plat-linux2'
'/usr/lib64/python2.5/lib-tk'
'/usr/lib64/python2.5/lib-dynload'
'/usr/lib64/python2.5/site-packages'
'/usr/lib64/python2.5/site-packages/Numeric'
'/usr/lib64/python2.5/site-packages/gtk-2.0'
'/usr/lib64/python2.5/site-packages/scim-0.1'
'/usr/lib/python2.5/site-packages'
'/media/server/www/webroot'
'/media/server/www/webroot'
'/media/server/www/webroot'
'/media/server/www/webroot']
It resets every time I restart apache.. is there any way to make sure this doesn't happen? I want the module path to be loaded only once..