Issue Details (XML | Word | Printable)

Key: MODPYTHON-88
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Graham Dumpleton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
mod_python

Initialise sys.argv to a dummy value.

Created: 11/Nov/05 02:00 PM   Updated: 05/Mar/06 02:43 PM
Return to search
Component/s: core
Affects Version/s: 2.7.10, 3.1.3, 3.1.4, 3.2.7
Fix Version/s: 3.2.7

Time Tracking:
Not Specified

Resolution Date: 13/Nov/05 05:12 AM


 Description  « Hide
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']


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Nicolas Lehuen made changes - 13/Nov/05 05:12 AM
Field Original Value New Value
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.2 [ 11060 ]
Nicolas Lehuen made changes - 13/Nov/05 05:13 AM
Affects Version/s 3.1.3 [ 11010 ]
Affects Version/s 2.7.10 [ 11011 ]
Affects Version/s 3.1.4 [ 11091 ]
Affects Version/s 3.3 [ 12310101 ]
Affects Version/s 3.2 [ 11060 ]
Graham Dumpleton made changes - 05/Mar/06 02:43 PM
Status Resolved [ 5 ] Closed [ 6 ]