__repr__ method for Host class

portnov [2009-02-23 20:09:42]
__repr__ method for Host class
Filename
test.py
diff --git a/test.py b/test.py
index 84d690c..4aaa3ae 100755
--- a/test.py
+++ b/test.py
@@ -46,6 +46,9 @@ class Host(object):
         self.ip = ''
         self.hostname = ''

+    def __repr__(self):
+        return "<Host %s>" % self.hostname
+
 class ZeroconfListener(object):
     def new_service(self, iface,proto,name,stype,domain, host, aproto,addr, port, txt,flags):
         global services
ViewGit