Newbie Windows Registry Question

Stacy stacycollings at
Mon Jul 12 13:13:03 EDT 2004

Hi All,

I'm trying to automate some migration tasks on XP and one of the steps
involved is to export a reg key to install on a new machine.  After
days of surfing the web and trying things, I give!Ineedsome newbie
help.  What I want is to export the given key to my USB drive for
later import to the new machine's registry.  The Python code I've
written also copies User files, favorites, etc...Here's an example of
what I have tried as far as the reg key goes:

import _winreg

This gives the following error:
SyntaxError: invalid token

Okay, so then I tried this:

And I get this error message:
TypeError: The object is not a PyHKEY object

Any idea what I am doing wrong?


Stacy :)

More information about the Python-list mailing list