[Python-Dev] PEP 370 - per-user scripts directory on Windows

Steve Dower Steve.Dower at microsoft.com
Thu Feb 12 15:26:55 CET 2015


You're not alone, that's exactly how I do it too.

I'm writing up a PEP for the activate-py command I suggested earlier that will temporarily set your PATH. If that goes well then we'll be able to ship that with the py.exe launcher (I'm particularly excited for batch files to be able to use it).

Cheers,
Steve

Top-posted from my Windows Phone
________________________________
From: Thomas Heller<mailto:theller at ctypes.org>
Sent: ‎2/‎12/‎2015 0:03
To: python-dev at python.org<mailto:python-dev at python.org>
Subject: Re: [Python-Dev] PEP 370 - per-user scripts directory on Windows

Am 10.02.2015 um 18:45 schrieb Steve Dower:
> As we've seen from earlier discussions, the main beneficiaries of
> having Python on PATH are those using the command-line. Most scripts
> are going to make assumptions or work unnecessarily hard to find the
> actual location of the Python version they need.

Maybe I'm more or less alone with the way I work, but I don't like
python.exe on my PATH (and py.exe alloes me to do this).
I start python scripts from the command line either with 'script.py'
or 'py -3.4 script.py' or 'py -2.7 script.py'.

I even like running scripts in this way:
'py -2.7 -m pip install whatever'.  However, this only works when the
script also can be started as package.  Some packages allow this,
some don't.

Could not py.exe be extended so that it allows starting scripts in a
somewhat similar way?  'py-script -2.7 myscript foo bar baz' ???
Which would execute the script myscript.exe, myscript.bat, myscript.py,
myscript.cmd or whatever is in the Scripts directory on the Python 2.7
installation, without changing PATH presistently?

Thanks,
Thomas

_______________________________________________
Python-Dev mailing list
Python-Dev at python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/steve.dower%40microsoft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150212/95022b93/attachment.html>


More information about the Python-Dev mailing list