Python 2.5.x _winreg - rename a subkey

Tim Golden mail at timgolden.me.uk
Tue Apr 27 08:25:49 EDT 2010


On 27/04/2010 12:23, Richard Lamboj wrote:
> is there a way to rename a subkey?

This is essentially a Windows question, since the _winreg module
is a lightweight wrapper around (some of) the MS Reg functions:

   http://msdn.microsoft.com/en-us/library/ms724875%28v=VS.85%29.aspx

And: no, there isn't a "rename key" function. Which isn't to say you
can't reproduce the effect by using SaveKey and LoadKey followed by
deleting the original key. The transactional functions which are
available from Vista onwards aren't exposed by Python altho' some
are available via the win32api module of the pywin32 packages:

   http://timgolden.me.uk/pywin32-docs/win32api.html

TJG



More information about the Python-list mailing list