[Python-Dev] PEP397 no command line options to python? (original) (raw)
Paul Moore p.f.moore at gmail.com
Sat Oct 22 15:27:26 CEST 2011
- Previous message: [Python-Dev] [PATCH] unicode subtypes broken in latest py3k debug builds
- Next message: [Python-Dev] PEP397 no command line options to python?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
(Sorry, should have gone to the list...)
On 22 October 2011 13:15, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
Nick Coghlan <ncoghlan gmail.com> writes:
As a simpler alternative, I suggest the launcher just gain a "--which" long option that displays the full path to the interpreter it found.
So: C:> py -2 --which C:\Python27\python.exe C:> py -3 --which C:\Python32\python.exe No significant complexity in the launcher, and if you want to add additional arguments like -m, -c, or -i you can do it by running '--which' and switching to invoking that interpreter directly. Perhaps even simpler would be for the -h option to print the interpreter paths which would be returned for -2 and -3, on separate lines, even without the --which, e.g. Currently configured: -2: c:\Python27\python.exe -3: c:\Python32\python.exe
--which is nice for people who can use Unix-style $() or Powershell & to directly execute the output as a command.
& (py -3 --which)
Paul
- Previous message: [Python-Dev] [PATCH] unicode subtypes broken in latest py3k debug builds
- Next message: [Python-Dev] PEP397 no command line options to python?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]