extending PATH on Windows?
eryksun at gmail.com
Fri Feb 19 13:07:24 EST 2016
On Thu, Feb 18, 2016 at 10:55 AM, Ulli Horlacher
<framstag at rus.uni-stuttgart.de> wrote:
> Ulli Horlacher <framstag at rus.uni-stuttgart.de> wrote:
>> > but simpler still and more reliable to just call QueryValueEx.
>> I find it more complicated.
> I have now (after long studying docs and examples)::
> def get_winreg(key,subkey):
> rkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER,key,0,winreg.KEY_READ)
> rvalue,rtype = winreg.QueryValueEx(rkey,subkey)
> except WindowsError:
> rvalue,rtype = None,None
> return rvalue
The 2nd parameter should be named "value_name", not "subkey".
A registry key is similar to an NTFS file-system node, and values are
similar to NTFS $DATA streams , but with different types of data
 other than just REG_BINARY, to make it easier to store structured
More information about the Python-list