[Tutor] creating a method name on the fly
dave s
pythontut at pusspaws.net
Mon Aug 7 20:10:27 CEST 2006
I need to scan a long list of QT tickboxes in a dialog. I need to execute
pseudo code something like ...
list = ['error_button', 'print_button' ... etc ]
for key in list:
button= list[key]
print button, self.button.isChecked()
where self.button.isChecked() becomes self.error_button.isChecked() ...
self.print_button.isChecked() .... etc etc
Can anyone tell me how to do this ? I have looked at apply but with no luck
Thanks
Dave
More information about the Tutor
mailing list