Re: [Python-Dev] Add python.exe to PATH environment variable

One of these days, I'm actually going to remember that I need to click "Reply All" when posting to this list... . Sorry for the duplicate, Greg. On Tue, Sep 2, 2008 at 6:45 PM, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
A better way would be to start a command process with the Python directory added to PATH just for that process.
This is similar to what Visual Studio or the Windows SDK do to give you a command prompt with the PATH and other environmental variables setup "correctly" -- they add a shortcut to a batch file that's set to keep the command prompt open after the batch file runs.
How easy would that be to do on Windows? Do environment variables get inherited by child processes the way they do on Unix?
Generally, yes. I think there's a catch in that there are ways to start processes that don't make them children of your process, but I don't remember why I think that. One other reason not to mess with the PATH -- at least by default -- is that the user may have multiple copies of Python installed. I know I have at least one machine with 2.4.5, 2.5.2, 2.6b2 and 3.0b2 installed -- and I don't want *any* of them in my path. -- Curt Hagenlocher curt@hagenlocher.org

On Wed, Sep 3, 2008 at 7:39 AM, Curt Hagenlocher <curt@hagenlocher.org>wrote:
One other reason not to mess with the PATH -- at least by default -- is that the user may have multiple copies of Python installed. I know I have at least one machine with 2.4.5, 2.5.2, 2.6b2 and 3.0b2 installed -- and I don't want *any* of them in my path.
Why ? you have them under Linux, through different names (python2.4, python2.5, etc) maybe this should be the same under Windows, e.g. having a common directory where all Python installations add a binary with a specific name, and same thing for binaries in Scripts, (easy_install-2.4, easy_install-2.5) a /usr/local/bin for Windows in a way... system32 ? Tarek
-- Curt Hagenlocher curt@hagenlocher.org _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/ziade.tarek%40gmail.com
-- Tarek Ziadé | Association AfPy | www.afpy.org Blog FR | http://programmation-python.org Blog EN | http://tarekziade.wordpress.com/
participants (2)
-
Curt Hagenlocher
-
Tarek Ziadé