[Patches] [ python-Patches-429614 ] pythonpath and optimize def. before init

noreply@sourceforge.net noreply@sourceforge.net
Thu, 07 Jun 2001 12:58:34 -0700


Patches item #429614, was updated on 2001-06-02 08:56
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=429614&group_id=5470

Category: core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Frederic Giacometti (giacometti)
Assigned to: Nobody/Anonymous (nobody)
Summary: pythonpath and optimize def. before init

Initial Comment:

A) Addition of four functions
=====================

Py_{Set, Get}{PythonPath, OptimizeLevel}()
with the same semantics as Py_{Set, Get}ProgramName()

(Note: the C ANSI type 'char const*' is used to describe non-modifiable strings)

These four functions are needed in the next JPE runtime (Python 2.1 patch included in the 
distribution); this allows setting the PYTHONPATH and optimize level from Java property values.


B) Option '-P pythonpath' on the Python command line:
========================================

This option defines 'pythonpath' from the command line (and override the PYTHONPATH 
environment variable if necessary).

Usefullness: Sometimes, one does not want to rely on the environment variables, or modify them.

Sample application: Running build and test scripts in full control of the environment, and with 
different PYTHONPATH values.

This option is needed by the build and test scripts of the next JPE source distribution (Python 2.1 
patch included in the distribution.

Frederic Giacometti
fred@arakne.com


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2001-06-07 12:58

Message:
Logged In: YES 
user_id=21627

I think a PEP describing the exact rationale and nature of 
the change is required here. For example, why is it good 
that -P overrides PYTHONPATH, instead of combining both 
somehow?

Also, the documentation talks about Py_GetOptimizeLevel, 
whereas the header declares Py_GetOptimizeFlag.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=429614&group_id=5470