[Python-Dev] Proposal: Registry access for Python on Windows

Gordon McMillan gmcm@hypernet.com
Tue, 1 Feb 2000 11:46:36 -0500


Thomas Heller wrote:

> I propose to include functions to access the windows registry
> into the python 1.6 core.
> 
> I have thrown together some code which I will post hopefully
> tomorrow, but I would like to hear some comments before.

[snip API - which appears to be a fairly low level wrap]

> Open Questions:
>   Is the recursive-flag for DeleteKey() too dangerous?

As long as it defaults to non-recursive, it's fine by me.

>   Should I switch from an integer handle to a full blown
>   python-object, which would call CloseKey() automatically in the
> destructor?

Absodefiposilutely Yes.

Not so sure you need typecode. There are 10 types defined, 
but most tools only do 3 (string, dword and binary) and most 
usage is of 2 (dword and string - which can hold binary data). 
So I'd think you could infer pretty safely. Actually, I guess this 
boils down to intent - "Python as a complete registry tool" 
would require all the types, but "Python can use the registry" 
could automatically use dword or string, as appropriate.

- Gordon