A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://python.github.io/peps/pep-0271/ below:

PEP 271 – Prefixing sys.path by command line option

Python Enhancement Proposals PEP 271 – Prefixing sys.path by command line option
Author:
Frédéric B. Giacometti <fred at arakne.com>
Status:
Rejected
Type:
Standards Track
Created:
15-Aug-2001
Python-Version:
2.2
Post-History:
Table of Contents Abstract

At present, setting the PYTHONPATH environment variable is the only method for defining additional Python module search directories.

This PEP introduces the ‘-P’ valued option to the python command as an alternative to PYTHONPATH.

Rationale

On Unix:

will be equivalent to:

env PYTHONPATH=$SOMEVALUE python

On Windows 2K:

will (almost) be equivalent to:

set __PYTHONPATH=%PYTHONPATH% && set PYTHONPATH=%SOMEVALUE%\
   && python && set PYTHONPATH=%__PYTHONPATH%
Other Information

This option is equivalent to the ‘java -classpath’ option.

When to use this option

This option is intended to ease and make more robust the use of Python in test or build scripts, for instance.

Reference Implementation

A patch implementing this is available from SourceForge:

http://sourceforge.net/tracker/download.php?group_id=5470&atid=305470&file_id=6916&aid=429614

with the patch discussion at:

http://sourceforge.net/tracker/?func=detail&atid=305470&aid=429614&group_id=5470
Copyright

This document has been placed in the public domain.

Source: https://github.com/python/peps/blob/main/peps/pep-0271.rst

Last modified: 2025-02-01 08:55:40 GMT


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4