You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by "Graham Dumpleton (JIRA)" <ji...@apache.org> on 2005/11/11 06:02:04 UTC

[jira] Created: (MODPYTHON-88) Initialise sys.argv to a dummy value.

Initialise sys.argv to a dummy value.
-------------------------------------

         Key: MODPYTHON-88
         URL: http://issues.apache.org/jira/browse/MODPYTHON-88
     Project: mod_python
        Type: Improvement
  Components: core  
    Versions: 3.3    
    Reporter: Graham Dumpleton
    Priority: Minor


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']


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (MODPYTHON-88) Initialise sys.argv to a dummy value.

Posted by "Nicolas Lehuen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-88?page=all ]
     
Nicolas Lehuen resolved MODPYTHON-88:
-------------------------------------

    Fix Version: 3.2
     Resolution: Fixed

As Graham suggested, added sys.argv=['mod_python'] in apache.init().

> Initialise sys.argv to a dummy value.
> -------------------------------------
>
>          Key: MODPYTHON-88
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-88
>      Project: mod_python
>         Type: Improvement
>   Components: core
>     Versions: 3.2, 2.7.10, 3.1.3, 3.1.4
>     Reporter: Graham Dumpleton
>     Priority: Minor
>      Fix For: 3.2

>
> 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']

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MODPYTHON-88) Initialise sys.argv to a dummy value.

Posted by "Nicolas Lehuen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-88?page=all ]

Nicolas Lehuen updated MODPYTHON-88:
------------------------------------

    Version: 3.1.4
             3.1.3
             2.7.10
             3.2
                 (was: 3.3)

> Initialise sys.argv to a dummy value.
> -------------------------------------
>
>          Key: MODPYTHON-88
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-88
>      Project: mod_python
>         Type: Improvement
>   Components: core
>     Versions: 3.2, 2.7.10, 3.1.3, 3.1.4
>     Reporter: Graham Dumpleton
>     Priority: Minor
>      Fix For: 3.2

>
> 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']

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MODPYTHON-88) Initialise sys.argv to a dummy value.

Posted by "Nicolas Lehuen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/MODPYTHON-88?page=comments#action_12357501 ] 

Nicolas Lehuen commented on MODPYTHON-88:
-----------------------------------------

Note that pychart is particularly weird, since not only it looks inside sys.argv, but it also requires a value to be passed (it uses sys.argv[0]) ! Talk about reusability...

> Initialise sys.argv to a dummy value.
> -------------------------------------
>
>          Key: MODPYTHON-88
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-88
>      Project: mod_python
>         Type: Improvement
>   Components: core
>     Versions: 3.2, 2.7.10, 3.1.3, 3.1.4
>     Reporter: Graham Dumpleton
>     Priority: Minor
>      Fix For: 3.2

>
> 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']

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MODPYTHON-88) Initialise sys.argv to a dummy value.

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-88?page=all ]
     
Graham Dumpleton closed MODPYTHON-88:
-------------------------------------


> Initialise sys.argv to a dummy value.
> -------------------------------------
>
>          Key: MODPYTHON-88
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-88
>      Project: mod_python
>         Type: Improvement
>   Components: core
>     Versions: 3.2.7, 2.7.10, 3.1.3, 3.1.4
>     Reporter: Graham Dumpleton
>     Priority: Minor
>      Fix For: 3.2.7

>
> 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']

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira