This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.moore
Recipients BreamoreBoy, Emil.Styrke, christian.heimes, paul.moore, steve.dower, tim.golden, zach.ware
Date 2015-03-23.21:31:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427146285.3.0.443839549886.issue16328@psf.upfronthosting.co.za>
In-reply-to
Content
There's actually a bug in the pre-3.5 script beyond the "does the directory exist" check. The code is

    if hasattr(site, "USER_SITE"):
        userpath = site.USER_SITE.replace(appdata, "%APPDATA%")
        userscripts = os.path.join(userpath, "Scripts")

which sets userscripts as %APPDATA%\Python\Python34\site-packages\Scripts, which is completely wrong. Stripping off 2 directory levels gives the correct answer, but that seems a bit arbitrary - using sysconfig seems more robust.

Also, there's another point made in the original report - the registry variable HKCU\Environment\PATH is set to "%PATH%;<the stuff we add>". That's just wrong - the user PATH variable is added to the system PATH variable, so why interpolate the existing value? It may be that the behaviour varies in different Windows versions, I don't know enough about how older versions work to comment on that.

There are enough bugs here that I suspect that very few people have ever used the script :-( Maybe it would be better to leave the older versions alone, and simply rewrite or remove it for 3.5 (I know Steve has ideas about providing new path-setting scripts)
History
Date User Action Args
2015-03-23 21:31:25paul.mooresetrecipients: + paul.moore, christian.heimes, tim.golden, BreamoreBoy, zach.ware, steve.dower, Emil.Styrke
2015-03-23 21:31:25paul.mooresetmessageid: <1427146285.3.0.443839549886.issue16328@psf.upfronthosting.co.za>
2015-03-23 21:31:25paul.moorelinkissue16328 messages
2015-03-23 21:31:25paul.moorecreate