RE: [Tutor] _winreg problems enumerating

2005-04-14 Thread jfouhy
Quoting "Gooch, John" <[EMAIL PROTECTED]>: > I am writing a function whose job is it delete all of the selected items > in a Listbox. I think this problem is the same as the general problem of deleting a selection of items from a python list. The general solution is to iterate through the list o

Re: [Tutor] _winreg problems enumerating

2005-04-14 Thread Liam Clarke
Hi Tim, Change this  - try:   while 1: test_key = regKeys.append(_winreg.EnumValue(hkey, i)) print test_key i += 1 except EnvironmentError: pass to try:   while 1:     regKeys.append(_winreg.EnumValue(hkey, i)) print regKeys[i] i += 1 except EnvironmentError: pass

RE: [Tutor] _winreg problems enumerating

2005-04-14 Thread Gooch, John
Let me know if there is a Tkinter list that is more appropriate for this question. I am writing a function whose job is it delete all of the selected items in a Listbox. The only ways I can think of doing this is to 1) Get list of selected items using the listbox.curselection and then delete each

RE: [Tutor] _winreg problems enumerating

2005-04-14 Thread Gallagher Timothy-TIMOTHYG
___ From: Liam Clarke [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 9:45 PM To: Gallagher Timothy-TIMOTHYG; tutor@python.org Subject: Re: [Tutor] _winreg problems enumerating Hi Tim, Hmmm, I may have to play with _winreg, is is new with Python 2.4? Anyway, from the _winreg docs

Re: [Tutor] _winreg problems enumerating

2005-04-14 Thread Kent Johnson
Gallagher Timothy-TIMOTHYG wrote: am new to python and want to learn this language. I am having troubles finding examples and tutorials for use on windows boxes. I do most of my stuff in perl and php but want better socket support, so I am giving python a try. I am writing a script to connect to

Re: [Tutor] _winreg problems enumerating

2005-04-13 Thread Liam Clarke
Hi Tim, Hmmm, I may have to play with _winreg, is is new with Python 2.4? Anyway, from the _winreg docs - EnumValue( key, index) Enumerates values of an open registry key, returning a tuple. key is an already open key, or any one of the predefined HKEY_* constants. index is an in