diff options
author | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-11-13 00:40:38 +0000 |
---|---|---|
committer | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-11-13 00:40:38 +0000 |
commit | 93293a573bda5eae15813b4c771863f740a01dd1 (patch) | |
tree | 550e33d3b31f4119d9196ff7d1ab5b8351a4f5a5 | |
parent | a154462dc83c8e4ba6d54c51f30b2cbd7ca66453 (diff) |
* merge the python dict support in trunk
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@952 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r-- | avahi-utils/avahi/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/avahi-utils/avahi/__init__.py b/avahi-utils/avahi/__init__.py index 6a3a1cf..c10b85d 100644 --- a/avahi-utils/avahi/__init__.py +++ b/avahi-utils/avahi/__init__.py @@ -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 |