[Python-Dev] Why does the Windows installer use the shortname formof the install directory?

Moore, Paul Paul.Moore@atosorigin.com
Fri, 11 Oct 2002 16:59:00 +0100

From: Tim Peters [mailto:tim.one@comcast.net]

> [Moore, Paul]
> > I just installed Python 2.2.2b1 (replacing ActiveState Python)
> > and I notice that the installer uses the shortname form of the
> > Python install directory. This appears in sys.path, in file
> > associations (and hence in sys.argv[0]), and in lots of other
> > places in the registry, not all of which I follow the reasons for.
> >
> > My Python install directory was C:\Applications\Python - not the
> > default, but also not containing spaces (which I guess could be a
> > problem for some scripts). So the short form should not be
> > necessary. I've fixed the problem manually by hacking the
> > registry, but it's not something I feel comfortable with...
> I must have missed what "the problem" is.  What is the problem?  Path
> components generally have two distinct names on Windows.  That's how
> the OS works -- we didn't invent this madness <wink>.

"problem" is probably a bit strong. It is user-visible in a few places =
(notably sys.path) and is arguably difficult to read in those places. =
But it's an issue of aesthetics rather than anything else.

OK, so if I have a sense of aesthetics, I probably shouldn't be using =
Windows :-)

Agreed, it's mainly an OS issue. If Windows didn't do the long/short =
pathname idiocy, and if the practice of using pathnames with spaces had =
never been promoted, we wouldn't be having this discussion. (Or if Unix =
people had got into the habit of actually using the freedom thay have to =
use pathnames containing all sorts of strange characters, we may be even =
worse off :-))

> > Would it be possible for the installer to use the long filename
> > form
> Yes, but I won't make that change, because we *used* to do it that way =
> it confused newbies endlessly, mostly because of embedded spaces.  By
> default, the installer suggests an 8.3 name so that nobody can get =
> Pick a non-8.3 name instead, and two distinct names are a fact of =
> Life you have to live with.

OK. If the other way has been shown to cause real problems, then that's =
a reason not to do that. Having used ActiveState's distribution until =
now (which uses the long form, and advises you not to use paths with =
spaces - I've no idea how it copes if you ignore its advice, though...) =
I didn't realise that you'd been through this.

> > (at least in cases where the install path does not contain spaces)?
> I don't know that the WISE scripting language is capable of making =
> distinction, and in the absence of an actual problem I'm not going to =
> time digging into it.  It's certainly too late to make this kind of =
> in the 2.2 line, so if a volunteer appears who cares enough to address =
> it would have to wait for 2.3.

That's fair enough. And it's not major enough that I'm pushing for =
anyone to waste time on it. I just thought I'd mention it in case it was =
a simple change to a checkbox, or something. I'm always optimistic on a =
Friday - I save the cynicism for Mondays... :-)

Thanks for taking the time to comment.