>
> while True:  # use the boolean value, its clearer IMHO :-)
>    try:
>       name.append(...)
>       print name[-1]
>       i += 1
>    except WindowsError: pass
>
[some comments cut]
>
> Note that this call will create a new name list inside the recursive
> call. You probably need to do:
>
>           name += ListRegistryKeys(item)


Mutating the list while iterating over it is possibly bad.  That's why 
it's probably better to use a separate variable to collect the 
sub-results.

Concretely:

##################
>>> L = [1]
>>> for x in L:
...    L.append(x)
...
##################

is an infinite loop.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to