Author eryksun
Recipients eryksun, neeverett, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-05-15.19:32:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494876766.95.0.937987242115.issue30374@psf.upfronthosting.co.za>
In-reply-to
Content
Are people actually using this script? Maybe it should simply be removed. I see a few problems with it [1]:

    * A default value of "%PATH%" is wrong. That causes the system
      PATH to be concatenated with itself.

    * For the user scripts directory, replacing appdata with
      "%APPDATA%" causes os.path.isdir to always fail.

    * REG_EXPAND_SZ should only be used when '%' occurs 2 or more
      times. Otherwise use REG_SZ. An existing REG_SZ type should 
      be preserved, if the value doesn't have two or more '%' 
      characters, because the user may be reusing PATH in a 
      REG_EXPAND_SZ variable.

      (The environment gets created in 2 passes -- actually 4 
      passes if we consider that system values are loaded 
      before user values. REG_SZ values get loaded first, and 
      then REG_EXPAND_SZ values are loaded and expanded. The 
      latter may depend on REG_SZ values, and also system 
      values in the user case, but should never depend on 
      other REG_EXPAND_SZ values since the enumeration order 
      of the registry key is undefined. In practice a key is
      enumerated in definition order, not the alphabetic 
      order displayed in regedit.)

    * It doesn't broadcast a WM_SETTINGCHANGE message, so it
      needlessly forces the user to log off and back on in order to
      use the modified PATH.

[1]: https://mail.python.org/pipermail/python-list/2016-February/703344.html
History
Date User Action Args
2017-05-15 19:32:47eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower, neeverett
2017-05-15 19:32:46eryksunsetmessageid: <1494876766.95.0.937987242115.issue30374@psf.upfronthosting.co.za>
2017-05-15 19:32:46eryksunlinkissue30374 messages
2017-05-15 19:32:46eryksuncreate