winreg module, need help to understand why i'm getting exception

s0suk3 at gmail.com s0suk3 at gmail.com
Sat Apr 19 08:44:01 EDT 2008


Sorry, the above post is not complete. This is the rest:

# There should be a for or a while loop around here
try:
    name = _winreg.EnumValue(key, index)
except EnvironmentError:
    # It raises WindowsError, but the _winreg documentation
    # recommends catching EnvironmentError
    break
else:
    # do something with 'name'
    ...

Anyway, I'd recommend using _winreg instead of the module you're
using, since it clearly has errors, and it's not on the standard
library.



More information about the Python-list mailing list