[Tutor] critique my script!
alan.gauld at freenet.co.uk
Sat Jun 24 14:34:17 CEST 2006
I can't really comment on the GTk bits because I've never used it.
>From what I can see it looks like a fairly standard type of GUI
A couple of comments:
> class Conversion_GUI:
> def print_celsius(self, widget):
> print "Degrees Celsius: %.2f" % self.degC
I assume this prints to a consol rather than the GUI?
> def __init__(self):
> def main(self):
I assume putting main inside the class is a GTk thing?
Its a bit unusual in normal OOP since every instance will
have a main() which is not the usual intention of main() functions...
> if __name__ == '__main__':
> convert = Conversion_GUI()
Why not simply
Since you don't use convert anywhere.
More information about the Tutor