I am still trying to understand when to use a class and when not to. All of the coding that I have done in the past (Python, Perl) has been procedural / functional. I would really like to do more OOP but I am not really sure when I need it.
I have the following code. Is there any way that it would benefit from using a class? <code> #!/usr/bin/env python import string import _winreg import sys compName = sys.argv[1] x = _winreg.ConnectRegistry(compName,_winreg.HKEY_LOCAL_MACHINE) y = _winreg.OpenKey(x, r"SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion") avParent = _winreg.QueryValueEx(y,"Parent")[0] _winreg.CloseKey(y) print "Computer: %s \tAV Parent: %s" % (compName,avParent) </code> -- Thanks Eric Lake
signature.asc
Description: Digital signature
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor