ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: Why does Python never add itself to the Windows path?
by Robert other posts by this author
Jan 4 2007 12:10PM messages near this date
Re: Why does Python never add itself to the Windows path? | Re: Why does Python never add itself to the Windows path?
Ben Sizer wrote:
>  robert wrote:
> > Ben Sizer wrote:
> >> My opinion is that this is not as big a problem as some may feel that
> >> it is. Unlike Unix systems, the PATH variable is rarely used.
> > It is a big problem.
> >
> > It is not less than the majority of Python users (at least those who do things on the com
mand line) who deal with multiple Python versions.
>  
>  So you think most Python users have more than one version of Python
>  installed? I disagree - but even if it is true, how come this isn't a
>  big problem on Unix? Can you name a single distribution that doesn't
>  install Python to the path?

As said - yes they install the 'pythonx.y' binary or just 'python' default link _into_ the p
ath (/usr/local/bin or /usr/bin). Yet they don't manipulate any PATH.


> > This would create funny PATH variables - almost a "psychic behavior with history".
>  
>  It is quite trivial to see if Python is already on the path, and act
>  differently based on that.

When you run an installer you first lookup the PATH and according to your look you hit or no
t-hit the (future) checkbox in the installer and/or edit the PATH later to only have one pyt
hon main folder in it?  
You could as well edit the PATH at all yourself as one can do it now.

> > Windows is at all less a multi user system. I don't even know a case where two (Python) P
rogrammers use _one_ box and then also want separate Python's - just know home mates (parasi
tes) who occasionally share the web browser or so...
>  
>  So... that's another reason why there's rarely a problem in setting
>  that PATH variable.

mix-up with PATH is already there for a single user. I named a most negative example (Borlan
d) and would not use such checkbox in a Python installer which would allow to manipulate the
 PATH in hardly  predictable manner.

> > Linking also a default python.exe into the system32 upon a (non-default) checkbox mark in
 the installer should be simple, clear and do everything what 99.9% want - and most "compati
ble" to *nix.
>  
>  No, it doesn't : the /scripts directory is also important for many
>  Python packages and that isn't addressed by shifting python.exe into
>  system32.

Now you want also the scripts directory on the PATH? I don't even see this stuff on linux py
's nor PATH's.

But as somebody said, we could have 3 or 4 options in the installer. Just who will supply Mv
L with the patch, which is truely not trivial.

Most cheap and consistent is:

Create pythonXY.exe always next to the pythonXY.dll auto. This is the same as having usr/loc
al/pythonX.Y on linux. (Personally I anyway like to call exactly the python i want.)

Then a future option 2 - as I'd favor it next to the current "do nothing" - would probably a
lso most simple for system installations:

If checkbox "copy python.exe into System Folder" then copy/overwrite python.exe into System 
Folder. There is not much magic and not much precedence worries about it and every developer
 knows clearly what happens. If multi-pythons, one knows that this would create the new defa
ult "python" on the command line unless one has custom things in front on the PATH. 

Then there could be advanced options 3, 4, .. for PATHs: With questions: Replacing in User- 
and/or System-PATH?, prepending-to-User/System-PATH?, appending-to-User/System-PATH, the sam
e for the Script-folders and all fancy things and side-effects etc.  - if consistent patches
 will ever be supplied ...
I'd not use these options a lot anyway because I like Python to answer my questions - not re
verse :-)


Robert
-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
Chris Lambacher
Robert
Ben Sizer
martin
Vbgunz
martin
martin
Ben Sizer
martin

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved