Using for... for multiple lists

Harlin Seritt harlinseritt at yahoo.com
Sun Mar 6 13:09:28 CET 2005


I am using the following code:

for i, f in filelist, self.checkbox:
   if f.get():
      print i

I am getting an error:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python23\lib\lib-tk\Tkinter.py", line 1345, in __call__
    return self.func(*args)
  File "install.py", line 123, in select_stage
    for i, f in filelist, self.checkbox:
ValueError: unpack list of wrong size

Both filelist and self.checkbox are the same size (4 items btw). Is
there any way to get this done?

Thanks,

Harlin




More information about the Python-list mailing list