]> git.meshlink.io Git - catta/commitdiff
* 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 6a3a1cfca66d48f5a0341e5e54ffe3824866a9ab..c10b85d404c6f8903cba1409ff416520179e6ff1 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