Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-22 Thread Michael Foord

On 22/07/2011 02:30, Vlad Riscutia wrote:
If versioned filenames are added in addition to python.exe, it still 
might look confusing for most users: Why do I have python and 
python3.2 executables? What's the difference? I'd rather go with -v 
argument either way, for people that /know/ they want to call Python 
3.2 instead of Python 3.1...




It doesn't seem to be too confusing for Linux / Mac OS X users where you 
have both. What's more it's very useful. I still like being able to 
specify version from the launcher, it's probably what I will use it most 
for (on the rare occasions I still use Windows).


Michael


Thank you,
Vlad

On Thu, Jul 21, 2011 at 6:07 PM, Éric Araujo mer...@netwok.org 
mailto:mer...@netwok.org wrote:


Hi,

Le 22/07/2011 03:03, Vlad Riscutia a écrit :
 I'm kind of -1 on changing Python executable name. It would make
sense for
 different major versions, where there are known
incompatibilities, so
 python2-python3 would make sense but python31 python32 not that
much...

 If my team is using Python and it gets pre-installed with other
dev-tools,
 do I need to let everyone know they must call python*31*? And if
we upgrade,
 make sure everyone knows they should now call python*32*? What
if we have
 scripts that call python? Make sure we update all of them
whenever minor
 version is changed?

If I understand correctly, adding versioned filenames like
python3.3.exe
would happen in addition of python.exe, not in replacement.

Regards




___
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/fuzzyman%40voidspace.org.uk



--
http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html

___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-22 Thread Brian Curtin
On Thu, Jul 21, 2011 at 20:30, Vlad Riscutia riscutiav...@gmail.com wrote:

 If versioned filenames are added in addition to python.exe, it still might
 look confusing for most users: Why do I have python and python3.2
 executables? What's the difference? I'd rather go with -v argument either
 way, for people that *know* they want to call Python 3.2 instead of Python
 3.1...

 Thank you,
 Vlad


Honestly, would it really be that confusing? Seeing python32.exe inside
C:\Python32 shouldn't be a huge surprise, and ActiveState has been doing
something like this for years (forever?).

Versioned executables in addition to the standard python.exe is something
I've wanted for a while, but that's outside of this PEP. This way you could
have C:\Python27 and C:\Python32 on your path and explicitly open up the
right one.
___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-22 Thread Vlad Riscutia
OK then. I don't have a *strong* opinion against it, just thought that most
people have one version of Python, maybe 2 versions as in 2.x and 3.x, so I
would understand python2.exe, python3.exe but yeah, it's not that big of a
deal either way.

Thank you,
Vlad

On Fri, Jul 22, 2011 at 6:41 AM, Brian Curtin brian.cur...@gmail.comwrote:

 On Thu, Jul 21, 2011 at 20:30, Vlad Riscutia riscutiav...@gmail.comwrote:

 If versioned filenames are added in addition to python.exe, it still might
 look confusing for most users: Why do I have python and python3.2
 executables? What's the difference? I'd rather go with -v argument either
 way, for people that *know* they want to call Python 3.2 instead of
 Python 3.1...

 Thank you,
 Vlad


 Honestly, would it really be that confusing? Seeing python32.exe inside
 C:\Python32 shouldn't be a huge surprise, and ActiveState has been doing
 something like this for years (forever?).

 Versioned executables in addition to the standard python.exe is something
 I've wanted for a while, but that's outside of this PEP. This way you could
 have C:\Python27 and C:\Python32 on your path and explicitly open up the
 right one.

___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-21 Thread Terry Reedy

On 7/20/2011 7:55 PM, Mark Hammond wrote:

On 21/07/2011 4:38 AM, Terry Reedy wrote:


Many installers first make an organization directory and then an app
directory within that. This annoys me sometimes when they only have one
app to ever install, but is useful when there might really be multiple
directories, as in our case. (Ditto for start menu entries.) This is
what python should have done a decade ago.



I disagree. If we followed that advice we would also be in \Program
Files.


That is not what I suggested. I said let the use pick.


I have no problem with multiple Python versions installed
directly off the root, especially given most users probably have a very
small number of such installations. I think Python being a developer
tool rather than a user app is a reasonable justification for that (and
the justification used when the existing scheme was decided)


I put the multiple installations and several other directories into 
/programs. On my next machine, on order, I will use /devel.



  The two proposals

overlap but are not mutually exclusive. For future pythons, 'python33'
is easier to remember and type than 'py -v 3.3' or whatever the proposed
encantation is.


'py -3.3' - less chars to type than 'python33' and with no need to have
every Python directory on your PATH.


My proposal, as I clearly said, was for EXACTLY ONE directory to be 
added to PATH. In spite of Microsoft making is damned difficult for 
users to edit PATH, (and deleted programs not deleting their entries) I 
added 'C:/programs;'. I copied python32/python as py32 and 
python27/python as py27. Those are even fewer characters to type (4 
versus 7). Now I can click a 'Command Prompt' icon and enter 'py32 -m 
test.regrtest' and it works without cd-ing to /programs/python32. Of 
course, I will have to re-copy with every install, which is why I would 
like something like this as part of installs.




IMO it is also simple enough that
people will remember it fairly easily.


py32 is even easier to remember.


Also, the launcher supports the ability to select either the 32 or 64bit
implementation - so maybe 'python33.exe' isn't really good enough and
should reflect the bittedness?


Like py32-6? If I install both Pythons on my new 64 bit machine, I will 
think about it, though I have no need for both now.



A python directory also gives a sensible (though optional) place to put
other interpreters and even python-based apps. The launcher does not.


What other interpreters? IMO it doesn't make sense to have IronPython,
jython etc be installed there. Ditto for apps - especially given most
apps tend to be tied to a subset of all possible Python versions.


If I install pypy, /programs is exactly where I would put it until I 
somehow discovered that to be a problem. Its startup could be copied as 
pp26 or something.



My idea may be not so good for general use, even though is now solves my 
problems, but please criticize what I said, allowing for obvious 
modifications like py32 instead of python32, and not a strawman that is 
wildly different.


--
Terry Jan Reedy

___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-21 Thread Vlad Riscutia
I'm kind of -1 on changing Python executable name. It would make sense for
different major versions, where there are known incompatibilities, so
python2-python3 would make sense but python31 python32 not that much...

If my team is using Python and it gets pre-installed with other dev-tools,
do I need to let everyone know they must call python*31*? And if we upgrade,
make sure everyone knows they should now call python*32*? What if we have
scripts that call python? Make sure we update all of them whenever minor
version is changed?

The way I look at it, most people have only one version of Python installed
at one time and it's just extra burden to make them remember major+minor
version number they have. If you actually install multiple versions, you do
that for a reason and, since you know what you're doing, you would rather
remember to pass correct -v argument to py than users who *just want to use
Python*.

Thank you,
Vlad

On Thu, Jul 21, 2011 at 12:42 PM, Terry Reedy tjre...@udel.edu wrote:

 On 7/20/2011 7:55 PM, Mark Hammond wrote:

 On 21/07/2011 4:38 AM, Terry Reedy wrote:

  Many installers first make an organization directory and then an app
 directory within that. This annoys me sometimes when they only have one
 app to ever install, but is useful when there might really be multiple
 directories, as in our case. (Ditto for start menu entries.) This is
 what python should have done a decade ago.


  I disagree. If we followed that advice we would also be in \Program
 Files.


 That is not what I suggested. I said let the use pick.


  I have no problem with multiple Python versions installed
 directly off the root, especially given most users probably have a very
 small number of such installations. I think Python being a developer
 tool rather than a user app is a reasonable justification for that (and
 the justification used when the existing scheme was decided)


 I put the multiple installations and several other directories into
 /programs. On my next machine, on order, I will use /devel.


The two proposals

 overlap but are not mutually exclusive. For future pythons, 'python33'
 is easier to remember and type than 'py -v 3.3' or whatever the proposed
 encantation is.


 'py -3.3' - less chars to type than 'python33' and with no need to have
 every Python directory on your PATH.


 My proposal, as I clearly said, was for EXACTLY ONE directory to be added
 to PATH. In spite of Microsoft making is damned difficult for users to edit
 PATH, (and deleted programs not deleting their entries) I added
 'C:/programs;'. I copied python32/python as py32 and python27/python as
 py27. Those are even fewer characters to type (4 versus 7). Now I can click
 a 'Command Prompt' icon and enter 'py32 -m test.regrtest' and it works
 without cd-ing to /programs/python32. Of course, I will have to re-copy with
 every install, which is why I would like something like this as part of
 installs.



  IMO it is also simple enough that
 people will remember it fairly easily.


 py32 is even easier to remember.


  Also, the launcher supports the ability to select either the 32 or 64bit
 implementation - so maybe 'python33.exe' isn't really good enough and
 should reflect the bittedness?


 Like py32-6? If I install both Pythons on my new 64 bit machine, I will
 think about it, though I have no need for both now.


  A python directory also gives a sensible (though optional) place to put
 other interpreters and even python-based apps. The launcher does not.


 What other interpreters? IMO it doesn't make sense to have IronPython,
 jython etc be installed there. Ditto for apps - especially given most
 apps tend to be tied to a subset of all possible Python versions.


 If I install pypy, /programs is exactly where I would put it until I
 somehow discovered that to be a problem. Its startup could be copied as pp26
 or something.


 My idea may be not so good for general use, even though is now solves my
 problems, but please criticize what I said, allowing for obvious
 modifications like py32 instead of python32, and not a strawman that is
 wildly different.

 --
 Terry Jan Reedy


 __**_
 Python-Dev mailing list
 Python-Dev@python.org
 http://mail.python.org/**mailman/listinfo/python-devhttp://mail.python.org/mailman/listinfo/python-dev
 Unsubscribe: http://mail.python.org/**mailman/options/python-dev/**
 riscutiavlad%40gmail.comhttp://mail.python.org/mailman/options/python-dev/riscutiavlad%40gmail.com

___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-21 Thread Éric Araujo
Hi,

Le 22/07/2011 03:03, Vlad Riscutia a écrit :
 I'm kind of -1 on changing Python executable name. It would make sense for
 different major versions, where there are known incompatibilities, so
 python2-python3 would make sense but python31 python32 not that much...
 
 If my team is using Python and it gets pre-installed with other dev-tools,
 do I need to let everyone know they must call python*31*? And if we upgrade,
 make sure everyone knows they should now call python*32*? What if we have
 scripts that call python? Make sure we update all of them whenever minor
 version is changed?

If I understand correctly, adding versioned filenames like python3.3.exe
would happen in addition of python.exe, not in replacement.

Regards
___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-21 Thread Vlad Riscutia
If versioned filenames are added in addition to python.exe, it still might
look confusing for most users: Why do I have python and python3.2
executables? What's the difference? I'd rather go with -v argument either
way, for people that *know* they want to call Python 3.2 instead of Python
3.1...

Thank you,
Vlad

On Thu, Jul 21, 2011 at 6:07 PM, Éric Araujo mer...@netwok.org wrote:

 Hi,

 Le 22/07/2011 03:03, Vlad Riscutia a écrit :
  I'm kind of -1 on changing Python executable name. It would make sense
 for
  different major versions, where there are known incompatibilities, so
  python2-python3 would make sense but python31 python32 not that much...
 
  If my team is using Python and it gets pre-installed with other
 dev-tools,
  do I need to let everyone know they must call python*31*? And if we
 upgrade,
  make sure everyone knows they should now call python*32*? What if we have
  scripts that call python? Make sure we update all of them whenever minor
  version is changed?

 If I understand correctly, adding versioned filenames like python3.3.exe
 would happen in addition of python.exe, not in replacement.

 Regards

___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-20 Thread Paul Moore
On 20 July 2011 03:21, Terry Reedy tjre...@udel.edu wrote:
 Suppose for Windows there were one '.../python' directory wherever the user
 first asks it to be put and that all pythons, not just cpython, are
 installed in directories below that and that the small startup file is
 copied into or linked from the python directory. Then the one python
 directory could be put on the path and left there and never removed by any
 python de-installer (unless perhaps it check that there are no subdirs and
 *asks* the user.

Hmm. Suppose that directory was C:\Program Files\Python Launcher (or
C:\Windows\system32 if you don't want to add an extra directory to
PATH). And suppose that instead of having a startup file per Python
installation you have a single file called py.exe. Then you have the
launcher!

Plus, the launcher has its own uninstaller, making it a normal part
of the Windows environment, rather than being a directory created by
something which doesn't get uninstalled.

Plus, the launcher has a means of dealing with the generic python,
python2 and python3 commands, which your proposal doesn't.

Plus, the launcher deals with existing versions of Python, which your
proposal doesn't (except by manual intervention).

But yes, the idea is sound, which is why it's so similar to what Vinay
did with the launcher IMO.

Paul.
___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-20 Thread Terry Reedy

On 7/20/2011 3:22 AM, Paul Moore wrote:

On 20 July 2011 03:21, Terry Reedytjre...@udel.edu  wrote:

Suppose for Windows there were one '.../python' directory wherever the user
first asks it to be put and that all pythons, not just cpython, are
installed in directories below that and that the small startup file is
copied into or linked from the python directory. Then the one python
directory could be put on the path and left there and never removed by any
python de-installer (unless perhaps it check that there are no subdirs and
*asks* the user.


Hmm. Suppose that directory was C:\Program Files\Python Launcher (or
C:\Windows\system32 if you don't want to add an extra directory to
PATH). And suppose that instead of having a startup file per Python
installation you have a single file called py.exe. Then you have the
launcher!

Plus, the launcher has its own uninstaller, making it a normal part
of the Windows environment, rather than being a directory created by
something which doesn't get uninstalled.

Plus, the launcher has a means of dealing with the generic python,
python2 and python3 commands, which your proposal doesn't.

Plus, the launcher deals with existing versions of Python, which your
proposal doesn't (except by manual intervention).

But yes, the idea is sound, which is why it's so similar to what Vinay
did with the launcher IMO.


Many installers first make an organization directory and then an app 
directory within that. This annoys me sometimes when they only have one 
app to ever install, but is useful when there might really be multiple 
directories, as in our case. (Ditto for start menu entries.) This is 
what python should have done a decade ago. Now is not too late.


The launcher has to be in a directory somewhere on the path. That 
directory could just as well be 'our' directory. The two proposals 
overlap but are not mutually exclusive. For future pythons, 'python33' 
is easier to remember and type than 'py -v 3.3' or whatever the proposed 
encantation is.


A python directory also gives a sensible (though optional) place to put 
other interpreters and even python-based apps. The launcher does not.


--
Terry Jan Reedy

___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-20 Thread Mark Hammond

On 21/07/2011 4:38 AM, Terry Reedy wrote:


Many installers first make an organization directory and then an app
directory within that. This annoys me sometimes when they only have one
app to ever install, but is useful when there might really be multiple
directories, as in our case. (Ditto for start menu entries.) This is
what python should have done a decade ago.


I disagree.  If we followed that advice we would also be in \Program 
Files.  I have no problem with multiple Python versions installed 
directly off the root, especially given most users probably have a very 
small number of such installations.  I think Python being a developer 
tool rather than a user app is a reasonable justification for that (and 
the justification used when the existing scheme was decided)


 The two proposals

overlap but are not mutually exclusive. For future pythons, 'python33'
is easier to remember and type than 'py -v 3.3' or whatever the proposed
encantation is.


'py -3.3' - less chars to type than 'python33' and with no need to have 
every Python directory on your PATH.  IMO it is also simple enough that 
people will remember it fairly easily.


Also, the launcher supports the ability to select either the 32 or 64bit 
implementation - so maybe 'python33.exe' isn't really good enough and 
should reflect the bittedness?



A python directory also gives a sensible (though optional) place to put
other interpreters and even python-based apps. The launcher does not.


What other interpreters?  IMO it doesn't make sense to have IronPython, 
jython etc be installed there.  Ditto for apps - especially given most 
apps tend to be tied to a subset of all possible Python versions.


Mark
___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-20 Thread Antoine Pitrou
On Thu, 21 Jul 2011 09:55:28 +1000
Mark Hammond skippy.hamm...@gmail.com wrote:
 
   The two proposals
  overlap but are not mutually exclusive. For future pythons, 'python33'
  is easier to remember and type than 'py -v 3.3' or whatever the proposed
  encantation is.
 
 'py -3.3' - less chars to type than 'python33' and with no need to have 
 every Python directory on your PATH.  IMO it is also simple enough that 
 people will remember it fairly easily.

Given that Python 2.x has a -3 option, isn't py -3.3 kind of
confusing, at least to the eye?

Regards

Antoine.


___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-20 Thread Mark Hammond

On 21/07/2011 10:08 AM, Antoine Pitrou wrote:

On Thu, 21 Jul 2011 09:55:28 +1000
Mark Hammondskippy.hamm...@gmail.com  wrote:


The two proposals

overlap but are not mutually exclusive. For future pythons, 'python33'
is easier to remember and type than 'py -v 3.3' or whatever the proposed
encantation is.


'py -3.3' - less chars to type than 'python33' and with no need to have
every Python directory on your PATH.  IMO it is also simple enough that
people will remember it fairly easily.


Given that Python 2.x has a -3 option, isn't py -3.3 kind of
confusing, at least to the eye?


A little, yeah, but IMO practicality beats purity here.  I'd probably 
feel different if I felt 'python -3' was regularly used and would 
continue to be so in the future.  Also, I think most people who would 
potentially use 'python -3' will be aware that running 'py' is a totally 
different command and will adjust accordingly (either by continuing to 
use 'python -3' or adjusting to running 'py -2 -3'.)


The PEP does make explicit mention of this...

Cheers,

Mark
___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-19 Thread Antoine Pitrou
On Tue, 19 Jul 2011 16:00:57 +0100
Paul Moore p.f.mo...@gmail.com wrote:

 On 19 July 2011 02:41, Vinay Sajip vinay_sa...@yahoo.co.uk wrote:
  The use of py from the command line is merely a convenience for developers 
  (as
  the PEP says) - it's better to rely on shebang lines together with settings 
  in
  the .ini to get the behaviour you want.
 
 But it's a *huge* convenience for running multiple Python versions,
 particularly as no existing Python versions install executables with
 the version in the name (python3.exe, python3.2.exe, etc).

Perhaps this could be changed? As far as I can see, python.exe is
a small executable around ~25KB (all the code being in the DLL), so
there doesn't seem to be any harm to make a copy of it named either
pythonXY.exe or pythonX.Y.exe.

Regards

Antoine.


___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-19 Thread Paul Moore
On 19 July 2011 16:16, Antoine Pitrou solip...@pitrou.net wrote:
 On Tue, 19 Jul 2011 16:00:57 +0100
 Paul Moore p.f.mo...@gmail.com wrote:

 On 19 July 2011 02:41, Vinay Sajip vinay_sa...@yahoo.co.uk wrote:
  The use of py from the command line is merely a convenience for developers 
  (as
  the PEP says) - it's better to rely on shebang lines together with 
  settings in
  the .ini to get the behaviour you want.

 But it's a *huge* convenience for running multiple Python versions,
 particularly as no existing Python versions install executables with
 the version in the name (python3.exe, python3.2.exe, etc).

 Perhaps this could be changed? As far as I can see, python.exe is
 a small executable around ~25KB (all the code being in the DLL), so
 there doesn't seem to be any harm to make a copy of it named either
 pythonXY.exe or pythonX.Y.exe.

I'm sure it could (and in fact, I thought that this had been discussed
some time back and it may even be already happening in 3.3) but it
doesn't help for existing versions, where the py.exe launcher does. So
as a longer-term solution, supplying pythonXY.exe binaries may be
useful (depending on how PEP 397 progresses), but the benefits won't
be for quite some time. (And there's still the question of what gets
put on PATH by default even if version-specific binaries exist).

It's a topic worthy of discussion, but I suspect that in actual fact,
PEP 397 may offer a more complete solution to the various Windows
installation niggles.

Two questions:
1. What level of support is there for PEP 397? If it's unlikely to get
accepted, there's little point in basing a solution on it.
2. Would it be worth extending the goals of the PEP to make
simplifying command line usage an explicit goal? Or is it better to
keep PEP 397 focused on one thing and have a separate PEP covering
such further extensions to the PEP 397 launcher?

Paul.
___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-19 Thread Antoine Pitrou
On Tue, 19 Jul 2011 17:21:30 +0100
Paul Moore p.f.mo...@gmail.com wrote:
 
 Two questions:
 1. What level of support is there for PEP 397? If it's unlikely to get
 accepted, there's little point in basing a solution on it.

It only needs support from our Windows users or developers.
It is doubtful than any Linux or OS X user would oppose it on purely
platonic grounds. I myself, as a casual Windows user, understand that
the current situation is not optimal and believe that any improvement is
welcome.

Practically, if Mark Hammond is satisfied with his own proposal, if
Martin doesn't oppose it, and if other users like you say it's a good
step forward, then I don't see any reason for it *not* to be accepted.

(if you want an explicit +1, here it is :-))

 2. Would it be worth extending the goals of the PEP to make
 simplifying command line usage an explicit goal? Or is it better to
 keep PEP 397 focused on one thing and have a separate PEP covering
 such further extensions to the PEP 397 launcher?

I have no opinion about that.

Regards

Antoine.
___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-19 Thread Nick Coghlan
On Wed, Jul 20, 2011 at 6:59 AM, Antoine Pitrou solip...@pitrou.net wrote:
 (if you want an explicit +1, here it is :-))

FWIW, +1 from me as well, but keep in mind that I actively avoid
programming on Windows (although I'm happy enough using it as a gaming
platform)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-19 Thread Mark Hammond

On 20/07/2011 1:00 AM, Paul Moore wrote:

On 19 July 2011 02:41, Vinay Sajipvinay_sa...@yahoo.co.uk  wrote:

The use of py from the command line is merely a convenience for developers (as
the PEP says) - it's better to rely on shebang lines together with settings in
the .ini to get the behaviour you want.


But it's a *huge* convenience for running multiple Python versions,
particularly as no existing Python versions install executables with
the version in the name (python3.exe, python3.2.exe, etc).And BAT
files aren't a suitable option (I'll rant about the issues with BAT
files if you want, but I recommend you don't ask :-))

Being able to say py -3, py -2.7, etc, rather than having to hack
PATH, create renamed copies of exes, etc, is arguably more of a
benefit to me than shebang support.


Ditto for me.


This may explain why I'd like to see a command-line means of invoking
custom commands. Something like py.exe looking at an initial argument,
and if it's of the form -cmd for a command in py.ini, then run that
command, passing remaining arguments just as for py -3. (Maybe --cmd
to match standard long option usage would be better?)

Presumably, if this idea is to go anywhere, it would need adding to
the PEP. Mark, do you think it would be useful?


I doubt I will find it useful - but I'm on record as saying I wont find 
the custom command support itself useful :)  But similarly with that 
support, evidence that enough people *will* find it useful is enough for 
me to support the concept.


My current thinking re the PEP is to make it much smaller - just 
describe the concepts and try to avoid as much implementation detail as 
possible - I see no reason the PEP needs to take a stance on issues like 
that - this feature really could be treated just like any other feature 
request in Python - a loose consensus and acceptable patch is all that 
is needed.


Mark
___
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/archive%40mail-archive.com


Re: [Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)

2011-07-19 Thread Terry Reedy

On 7/19/2011 12:21 PM, Paul Moore wrote:

On 19 July 2011 16:16, Antoine Pitrousolip...@pitrou.net  wrote:

On Tue, 19 Jul 2011 16:00:57 +0100



Perhaps this could be changed? As far as I can see, python.exe is
a small executable around ~25KB (all the code being in the DLL), so
there doesn't seem to be any harm to make a copy of it named either
pythonXY.exe or pythonX.Y.exe.


I'm sure it could (and in fact, I thought that this had been discussed
some time back and it may even be already happening in 3.3) but it
doesn't help for existing versions, where the py.exe launcher does. So
as a longer-term solution, supplying pythonXY.exe binaries may be
useful (depending on how PEP 397 progresses), but the benefits won't
be for quite some time. (And there's still the question of what gets
put on PATH by default even if version-specific binaries exist).


Suppose for Windows there were one '.../python' directory wherever the 
user first asks it to be put and that all pythons, not just cpython, are 
installed in directories below that and that the small startup file is 
copied into or linked from the python directory. Then the one python 
directory could be put on the path and left there and never removed by 
any python de-installer (unless perhaps it check that there are no 
subdirs and *asks* the user.


--
Terry Jan Reedy

___
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/archive%40mail-archive.com