From 93293a573bda5eae15813b4c771863f740a01dd1 Mon Sep 17 00:00:00 2001 From: Sebastien Estienne Date: Sun, 13 Nov 2005 00:40:38 +0000 Subject: * merge the python dict support in trunk git-svn-id: file:///home/lennart/svn/public/avahi/trunk@952 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-utils/avahi/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'avahi-utils') 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 -- cgit