As mod_python isn't executed as part of a traditional command line program but is embedded into Apache, there is no actual sys.argv array for command line parameters. This though causes problems when certain third party modules are used which want for some reason to query sys.argv, eg. numarray:
Simple way of avoiding this would be if apache.init() method executed for each interpreter being created set sys.argv.
sys.argv = ['mod_python']
Description
As mod_python isn't executed as part of a traditional command line program but is embedded into Apache, there is no actual sys.argv array for command line parameters. This though causes problems when certain third party modules are used which want for some reason to query sys.argv, eg. numarray:
http://www.modpython.org/pipermail/mod_python/2005-October/019401.html
and pychart:
http://www.modpython.org/pipermail/mod_python/2005-October/019360.html
Simple way of avoiding this would be if apache.init() method executed for each interpreter being created set sys.argv.
sys.argv = ['mod_python']