Quote:
I can't see why you'd want to pass a string in this case.
|
This script sets some registry keys, these keys need to be changed back to the original values after a while, so I write a backup file with a list of keys and their values, the hive name needs to be included obviously. I guess I can pickle, but I want the file to be plain text so it can be examined&modified if needed.
I can use
if reg == 2147483650:
str = 'HKEY_LOCAL_MACHINE'
But does this work on every system config, and on every Windows version (XP, Vista, 2003, 2008)?
Other than that, it is _ugly_, passing two values (str and reg.HKLM/HKCU) would be better...