Re: [Distutils] Make ez_setup.py/easy_install $PATH aware
At 02:38 PM 9/17/2006 +0100, Paul Moore wrote:
BTW, if you really want to make easy_install.exe available on the command line without needing a PATH entry, you can do what python.exe does: create a registry key
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\easy_install.exe
with a single default value of the full pathname for the executable. Then you don't need to muck with the user's PATH at all. For more details, search for "App Paths" in the platform SDK - it gives the full details.
Unfortunately, the details it gives are wrong. Neither cmd.exe, command.com, nor bash will find a program registered this way, at least on my Win2K PC. This appears to *only* work for the Start/Run menu. Which isn't a bad start; I imagine that setuptools "GUI scripts" should be installed this way on Windows until/unless we get a way to give them menu entries or icons. A little further investigation reveals that typing "start whatever" in a command window will let you run something that's in "App Paths", *but* it will start in its own window, even if it's a console application. :( So, for console scripts, this still leaves something to be desired. As far as I can tell, *despite* what the MSDN docs say about App Paths, it is strictly a GUI facility and has no effect on command shells. (Interestingly, the lower-level SDK's show why - CreateProcess() ignores app paths, and only ShellExecute takes it into account. That's how I figured out that I could use the "start" command as well as the Start/Run menu option.)
On 9/17/06, Phillip J. Eby
BTW, if you really want to make easy_install.exe available on the command line without needing a PATH entry, you can do what python.exe does: create a registry key
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\easy_install.exe [...] Unfortunately, the details it gives are wrong. Neither cmd.exe, command.com, nor bash will find a program registered this way, at least on my Win2K PC. This appears to *only* work for the Start/Run menu. Which isn't a bad start; I imagine that setuptools "GUI scripts" should be installed this way on Windows until/unless we get a way to give them menu entries or icons. [...] As far as I can tell, *despite* what the MSDN docs say about App Paths, it is strictly a GUI facility and has no effect on command shells. (Interestingly, the lower-level SDK's show why - CreateProcess() ignores app paths, and only ShellExecute takes it into account. That's how I figured out that I could use the "start" command as well as the Start/Run
At 02:38 PM 9/17/2006 +0100, Paul Moore wrote: menu option.)
Sorry about that. I use 4NT, and it never occurred to me that CMD didn't do this as well. Does this mean that on a standard PC, with CMD.exe, typing "python" at he command prompt (with Python installed from the standard installer) doesn't work???!?? [A quick test in VMWare later] Wow! It really doesn't! That seems, well, "less than ideal" :-( How does anyone live with that? I guess command-line Python users on Windows are used to needing to fix up PATH... Thanks for correcting my mistake. Paul. Paul.
On Sun, 17 Sep 2006, Phillip J. Eby wrote: [...]
Unfortunately, the details it gives are wrong. Neither cmd.exe, command.com, nor bash will find a program registered this way, at least on my Win2K PC. [...] A little further investigation reveals that typing "start whatever" in a command window will let you run something that's in "App Paths", *but* it will start in its own window, even if it's a console application. :(
So, for console scripts, this still leaves something to be desired. [...]
Crap. I withdraw my proposal. (except for the part about having a little Tkinter GUI to allow you to install projects via a PyPI query and point and click -- that would still be nice, especially wrt being friendly to new Python / easy_install users) John
John J Lee wrote:
On Sun, 17 Sep 2006, Phillip J. Eby wrote: [...]
Unfortunately, the details it gives are wrong. Neither cmd.exe, command.com, nor bash will find a program registered this way, at least on my Win2K PC.
[...]
A little further investigation reveals that typing "start whatever" in a command window will let you run something that's in "App Paths", *but* it will start in its own window, even if it's a console application. :(
So, for console scripts, this still leaves something to be desired.
[...]
Crap. I withdraw my proposal.
(except for the part about having a little Tkinter GUI to allow you to install projects via a PyPI query and point and click -- that would still be nice, especially wrt being friendly to new Python / easy_install users)
This would seem to be an excellent basis : http://www.boddie.org.uk/david/Projects/Python/PyPI-Browser/ (except for the license.) Fuzzyman http://www.voidspace.org.uk/python/index.shtml
John
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
-- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date: 15/09/2006
On Sun, 17 Sep 2006, Michael Foord wrote: [...]
(except for the part about having a little Tkinter GUI to allow you to install projects via a PyPI query and point and click -- that would still be nice, especially wrt being friendly to new Python / easy_install users)
This would seem to be an excellent basis :
http://www.boddie.org.uk/david/Projects/Python/PyPI-Browser/
(except for the license.)
and the GUI toolkit: a Tkinter-based GUI would be more appropriate for distribution with easy_install (since Tkinter is included with the default CPython Windows install). I suppose these days Windows Forms (or WinFX / WPF?) and Swing versions would also be good :-/ (What happened to anygui?) John
participants (4)
-
John J Lee
-
Michael Foord
-
Paul Moore
-
Phillip J. Eby