* merge the python dict support in trunk
authorSebastien Estienne <sebastien.estienne@gmail.com>
Sun, 13 Nov 2005 00:40:38 +0000 (00:40 +0000)
committerSebastien Estienne <sebastien.estienne@gmail.com>
Sun, 13 Nov 2005 00:40:38 +0000 (00:40 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@952 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-utils/avahi/__init__.py

index 6a3a1cf..c10b85d 100644 (file)
@@ -74,3 +74,11 @@ def string_array_to_txt_array(t):
         l.append(string_to_byte_array(s))
 
     return l
+
+def dict_to_txt_array(txt_dict):
+    l = []
+
+    for k,v in txt_dict.items():
+        l.append(string_to_byte_array("%s=%s" % (k,v)))
+
+    return l