Merge pull request #605 from openweave/feature/delete-pwd

delete default test password
diff --git a/.travis/before_install.sh b/.travis/before_install.sh
index f41c797..dcf8148 100755
--- a/.travis/before_install.sh
+++ b/.travis/before_install.sh
@@ -58,11 +58,10 @@
             sudo apt-get update
             sudo apt-get -y install bridge-utils
             sudo apt-get -y install lcov
-            sudo apt-get -y install python-lockfile
-            sudo apt-get -y install python-psutil
-            sudo apt-get -y install python-setuptools
-            sudo apt-get -y install swig
-
+            sudo apt-get -y install python3-lockfile
+            sudo apt-get -y install python3-pip
+            sudo apt-get -y install python3-setuptools
+            sudo apt-get -y install python3-psutil
             ;;
 
         openssl-deps)
@@ -161,11 +160,10 @@
         installdeps "happy-deps"
 
         cd $HOME
-        git clone https://github.com/openweave/happy.git
+        git clone --single-branch --branch feature/happy_py3_support https://github.com/openweave/happy.git
         cd ${HOME}/happy
         make install
-        python pip_packages.py
-        pip install pexpect
+        python3 pip_packages.py
         sudo apt install python-gobject
         sudo apt install python-dbus
 
diff --git a/build/esp32/components/openweave/Kconfig b/build/esp32/components/openweave/Kconfig
index 65909ca..e406ac8 100644
--- a/build/esp32/components/openweave/Kconfig
+++ b/build/esp32/components/openweave/Kconfig
@@ -393,7 +393,14 @@
                 The priority of the Weave task.
                 
                 On the ESP32 platform this value is added to ESP_TASK_PRIO_MIN to determine the FreeRTOS priority value.
-        
+
+        config THREAD_TASK_STACK_SIZE
+            int "Thread Task Stack Size"
+            range 0 65535
+            default 8192
+            help
+                The size (in bytes) of the Thread task stack.
+
         config MAX_EVENT_QUEUE_SIZE
             int "Max Event Queue Size"
             range 0 65535
@@ -657,6 +664,14 @@
     
     endmenu
     
+    menu "Thread Options"
+
+        config WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+            bool "Enable Thread support (with external RCP)"
+            default n
+
+    endmenu
+    
     menu "Service Provisioning Options"
     
         config SERVICE_PROVISIONING_ENDPOINT_ID
diff --git a/build/esp32/components/openweave/component.mk b/build/esp32/components/openweave/component.mk
index 524448a..1b3d189 100644
--- a/build/esp32/components/openweave/component.mk
+++ b/build/esp32/components/openweave/component.mk
@@ -122,17 +122,6 @@
 COMPONENT_ADD_INCLUDEDIRS 	 = project-config \
                                $(REL_OUTPUT_DIR)/include
 
-# Linker flags to be included when building other components that use Weave. 
-COMPONENT_ADD_LDFLAGS        = -L$(OUTPUT_DIR)/lib \
-					           -lWeave \
-					           -lInetLayer \
-					           -lmincrypt \
-					           -lnlfaultinjection \
-					           -lSystemLayer \
-					           -luECC \
-					           -lWarm \
-					           -lDeviceLayer
-
 # Tell the ESP-IDF build system that the OpenWeave component defines its own build
 # and clean targets.
 COMPONENT_OWNBUILDTARGET 	 = 1
@@ -143,7 +132,7 @@
 # Build Rules
 # ==================================================
 
-.PHONY : check-config-args-updated
+.PHONY : check-config-args-updated install-weave build-weave configure-weave
 check-config-args-updated : | $(OUTPUT_DIR)
 	echo $(OPENWEAVE_ROOT)/configure -C $(CONFIGURE_OPTIONS) > $(OUTPUT_DIR)/config.args.tmp; \
 	(test -r $(OUTPUT_DIR)/config.args && cmp -s $(OUTPUT_DIR)/config.args.tmp $(OUTPUT_DIR)/config.args) || \
@@ -171,11 +160,34 @@
 	echo "BUILD OPENWEAVE..."
 	MAKEFLAGS= make -C $(OUTPUT_DIR) --no-print-directory all
 
-install-weave : | build-weave
+install-weave : build-weave
 	echo "INSTALL OPENWEAVE..."
 	MAKEFLAGS= make -C $(OUTPUT_DIR) --no-print-directory install
 
-build : build-weave install-weave
+# Openweave build routine builds several .a libraries (lib{Weave|InetLayer|...}.a)
+# instead of a single library (libopenweave.a) which is expected by esp-idf 3.3
+# Here, we extract the libraries and repack them into a one big library
+OPENWEAVE_STATIC_LIBRARIES = \
+	$(OUTPUT_DIR)/lib/libWeave.a             \
+	$(OUTPUT_DIR)/lib/libInetLayer.a         \
+	$(OUTPUT_DIR)/lib/libmincrypt.a          \
+	$(OUTPUT_DIR)/lib/libnlfaultinjection.a  \
+	$(OUTPUT_DIR)/lib/libSystemLayer.a       \
+	$(OUTPUT_DIR)/lib/libuECC.a              \
+	$(OUTPUT_DIR)/lib/libWarm.a              \
+	$(OUTPUT_DIR)/lib/libDeviceLayer.a       \
+
+# Extract and repack the %.a files into a single libopenweave.a
+$(OUTPUT_DIR)/libopenweave.a : install-weave
+	mkdir -p $(OUTPUT_DIR)/libopenweave.a.tmp
+	cd $(OUTPUT_DIR)/libopenweave.a.tmp; \
+	for files in $(OPENWEAVE_STATIC_LIBRARIES) ; do \
+	  $(AR) -x $$files ; \
+	done
+	$(AR) cru $@ $(OUTPUT_DIR)/libopenweave.a.tmp/*.o
+	rm -rf $(OUTPUT_DIR)/libopenweave.a.tmp
+
+build : build-weave install-weave $(OUTPUT_DIR)/libopenweave.a
 
 clean:
 	echo "RM $(OUTPUT_DIR)"
diff --git a/build/nrf5/nrf5-openthread.mk b/build/nrf5/nrf5-openthread.mk
index 2a17c0a..2fa48ae 100644
--- a/build/nrf5/nrf5-openthread.mk
+++ b/build/nrf5/nrf5-openthread.mk
@@ -23,28 +23,28 @@
 
 #
 #   This makefile is intended to work in conjunction with the nrf5-app.mk
-#   makefile to build the OpenWeave example applications on Nordic platforms. 
+#   makefile to build the OpenWeave example applications on Nordic platforms.
 #   nRF5 applications should include this file in their top level Makefile
 #   after including nrf5-app.mk and nrf5-openweave.mk.  E.g.:
 #
 #       PROJECT_ROOT = $(realpath .)
 #
 #       BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/openweave-core/build/nrf5
-#       
+#
 #       include $(BUILD_SUPPORT_DIR)/nrf5-app.mk
 #       include $(BUILD_SUPPORT_DIR)/nrf5-openweave.mk
 #       include $(BUILD_SUPPORT_DIR)/nrf5-openthread.mk
 #
 #       PROJECT_ROOT := $(realpath .)
-#       
+#
 #       APP := openweave-nrf52840-bringup
-#       
+#
 #       SRCS = \
 #           $(PROJECT_ROOT)/main.cpp \
 #           ...
 #
 #       $(call GenerateBuildRules)
-#       
+#
 
 
 # ==================================================
@@ -54,13 +54,16 @@
 # OpenThread source root directory
 OPENTHREAD_ROOT ?= $(PROJECT_ROOT)/third_party/openthread
 
+# Minimal OpenThread API version number required
+OPENTHREAD_API_VERSION_MINIMAL ?= 0
+
 # Target for which OpenThread will be built.
 OPENTHREAD_TARGET = nrf52840
 
 # Archtecture for which OpenThread will be built.
 OPENTHREAD_HOST_ARCH = arm-none-eabi
 
-# Directory into which the OpenThread build system will place its output. 
+# Directory into which the OpenThread build system will place its output.
 OPENTHREAD_OUTPUT_DIR = $(OUTPUT_DIR)/openthread
 
 # Directory containing OpenThread libraries.
@@ -73,7 +76,7 @@
 OPENTHREAD_PREREQUISITE = $(if $(filter-out 0, $(USE_PREBUILT_OPENTHREAD)),,install-thread)
 
 # Name of OpenThread's platform config file.  By default, this is set to
-# the nRF5-specific file found in OpenThread's examples directory.  
+# the nRF5-specific file found in OpenThread's examples directory.
 # Applications can override this to force inclusion of their own configuration
 # file. However, in most cases, the application-specified file should include
 # the Nordic file to ensure that OpenThread is configured properly for the
@@ -82,24 +85,33 @@
 
 # Additional header files needed by the Nordic port of OpenThread
 # but not installed automatically by OpenThread's build system.
-OPENTHREAD_PLATFORM_HEADERS = \
+OPENTHREAD_PLATFORM_HEADERS = $(OPENTHREAD_ROOT)/examples/platforms/openthread-system.h
+
+ifeq ($(OPENTHREAD_API_VERSION_MINIMAL),0)
+OPENTHREAD_PLATFORM_HEADERS += \
     $(OPENTHREAD_ROOT)/examples/platforms/$(OPENTHREAD_TARGET)/platform-fem.h \
     $(OPENTHREAD_ROOT)/examples/platforms/$(OPENTHREAD_TARGET)/platform-softdevice.h \
     $(OPENTHREAD_ROOT)/examples/platforms/$(OPENTHREAD_TARGET)/openthread-core-$(OPENTHREAD_TARGET)-config.h \
-    $(OPENTHREAD_ROOT)/examples/platforms/openthread-system.h
 
+else
+OPENTHREAD_PLATFORM_HEADERS += \
+    $(OPENTHREAD_ROOT)/examples/platforms/nrf528xx/src/platform-fem.h \
+    $(OPENTHREAD_ROOT)/examples/platforms/nrf528xx/src/platform-softdevice.h \
+    $(OPENTHREAD_ROOT)/examples/platforms/nrf528xx/$(OPENTHREAD_TARGET)/openthread-core-$(OPENTHREAD_TARGET)-config.h \
+
+endif
 
 # ==================================================
 # Build options
 # ==================================================
 
-# Use the prebuilt OpenThread libraries included in the Nordic nRF5 SDK instead of 
+# Use the prebuilt OpenThread libraries included in the Nordic nRF5 SDK instead of
 # building OpenThread from source.
 #
 # NOTE: Due to the lack of multi-threading support in Nordic's port of OpenThread
 # (in particular, in the crypto code) it is currently not possible to build a working
 # OpenWeave application that uses the prebuilt OpenThread libraries.
-# 
+#
 USE_PREBUILT_OPENTHREAD ?= 0
 
 # ==================================================
@@ -124,10 +136,24 @@
     MBEDTLS_USER_CONFIG_FILE='"nrf52840-mbedtls-config.h"' \
     OPENTHREAD_PROJECT_CORE_CONFIG_FILE='"$(OPENTHREAD_PROJECT_CONFIG)"'
 
+ifneq ($(OPENTHREAD_API_VERSION_MINIMAL),0)
+OPENTHREAD_DEFINES += \
+    MBEDTLS_THREADING_C \
+    MBEDTLS_THREADING_ALT \
+
+STD_DEFINES += \
+    MBEDTLS_THREADING_C \
+    MBEDTLS_THREADING_ALT \
+
+endif
+
 OPENTHREAD_INC_DIRS = \
     $(OPENTHREAD_ROOT)/examples/platforms/$(OPENTHREAD_TARGET) \
+    $(OPENTHREAD_ROOT)/examples/platforms/nrf528xx/$(OPENTHREAD_TARGET) \
     $(OPENTHREAD_ROOT)/third_party/NordicSemiconductor/libraries/crypto \
     $(OPENTHREAD_ROOT)/third_party/NordicSemiconductor/libraries/nrf_cc310/include \
+    $(OPENTHREAD_ROOT)/third_party/NordicSemiconductor/libraries/nrf_security/include/software-only-threading \
+    $(OPENTHREAD_ROOT)/third_party/NordicSemiconductor/libraries/nrf_security/mbedtls_plat_config \
     $(NRF5_SDK_ROOT)/modules/nrfx/mdk \
     $(NRF5_SDK_ROOT)/external/freertos/config \
     $(NRF5_SDK_ROOT)/external/freertos/portable/CMSIS/nrf52 \
@@ -180,7 +206,7 @@
 
 
 # ==================================================
-# Adjustments to standard build settings to 
+# Adjustments to standard build settings to
 #   incorporate OpenThread into the application.
 # ==================================================
 
@@ -196,13 +222,17 @@
     $(NRF5_SDK_ROOT)/external/openthread/include \
     $(NRF5_SDK_ROOT)/external/openthread/project/$(OPENTHREAD_TARGET) \
     $(NRF5_SDK_ROOT)/external/openthread/include/openthread/platform/mbedtls
-#    $(NRF5_SDK_ROOT)/external/nrf_cc310/include
+
 STD_INC_DIRS_BUILT = \
     $(OPENTHREAD_OUTPUT_DIR)/include \
+    $(OPENTHREAD_ROOT)/include \
+    $(OPENTHREAD_ROOT)/src/core \
     $(OPENTHREAD_ROOT)/third_party/mbedtls \
     $(OPENTHREAD_ROOT)/third_party/mbedtls/repo/include \
-    $(OPENTHREAD_ROOT)/third_party/NordicSemiconductor/libraries/crypto
-#    $(OPENTHREAD_ROOT)/third_party/NordicSemiconductor/libraries/nrf_cc310/include  
+    $(OPENTHREAD_ROOT)/third_party/NordicSemiconductor/libraries/crypto \
+    $(OPENTHREAD_ROOT)/third_party/NordicSemiconductor/libraries/nrf_security/include/software-only-threading \
+    $(OPENTHREAD_ROOT)/third_party/NordicSemiconductor/libraries/nrf_security/mbedtls_plat_config \
+
 STD_INC_DIRS += $(if $(filter-out 0, $(USE_PREBUILT_OPENTHREAD)), \
     $(STD_INC_DIRS_PREBUILT), \
     $(STD_INC_DIRS_BUILT))
@@ -213,15 +243,20 @@
     -L$(OPENTHREAD_LIB_DIR) \
     -L$(NRF5_SDK_ROOT)/external/nrf_cc310/lib
 
-# Add OpenThread libraries to standard libraries list. 
+# Add OpenThread libraries to standard libraries list.
 STD_LIBS += \
-    -lopenthread-diag \
     -lopenthread-ftd \
     -lopenthread-platform-utils \
     -lopenthread-nrf52840-softdevice-sdk \
     -lnordicsemi-nrf52840-radio-driver-softdevice \
     -lmbedcrypto
-    
+
+ifeq ($(OPENTHREAD_API_VERSION_MINIMAL),0)
+STD_LIBS += -lopenthread-diag
+else
+STD_LIBS += -lopenthread-$(OPENTHREAD_TARGET)-transport
+endif
+
 # Add the appropriate OpenThread target as a prerequisite to all application
 # compilation targets to ensure that OpenThread gets built and its header
 # files installed prior to compiling any dependent source files.
@@ -229,13 +264,16 @@
 
 # Add the OpenThread libraries as prerequisites for linking the application.
 STD_LINK_PREREQUISITES += \
-    $(OPENTHREAD_LIB_DIR)/libopenthread-diag.a \
     $(OPENTHREAD_LIB_DIR)/libopenthread-ftd.a \
     $(OPENTHREAD_LIB_DIR)/libopenthread-platform-utils.a \
     $(OPENTHREAD_LIB_DIR)/libmbedcrypto.a \
     $(OPENTHREAD_LIB_DIR)/libopenthread-nrf52840-softdevice-sdk.a \
     $(OPENTHREAD_LIB_DIR)/libnordicsemi-nrf52840-radio-driver-softdevice.a
 
+ifeq ($(OPENTHREAD_API_VERSION_MINIMAL),0)
+STD_LINK_PREREQUISITES += \
+    $(OPENTHREAD_LIB_DIR)/libopenthread-diag.a
+endif
 
 # ==================================================
 # Late-bound build rules for OpenThread
@@ -244,7 +282,7 @@
 ifneq ($(USE_PREBUILT_OPENTHREAD),1)
 
 # Add OpenThreadBuildRules to the list of late-bound build rules that
-# will be evaluated when GenerateBuildRules is called. 
+# will be evaluated when GenerateBuildRules is called.
 LATE_BOUND_RULES += OpenThreadBuildRules
 
 # Rules for configuring, building and installing OpenThread from source.
@@ -301,14 +339,14 @@
 
 
   bootstrap-thread      Run the OpenThread bootstrap script.
-  
+
   config-thread         Run the OpenThread configure script.
-  
+
   build-thread          Build the OpenThread libraries.
-  
-  install-thread        Install OpenThread libraries and headers in 
+
+  install-thread        Install OpenThread libraries and headers in
                         build output directory for use by application.
-  
+
   clean-thread          Clean all build outputs produced by the OpenThread
                         build process.
 endef
diff --git a/configure.ac b/configure.ac
index b69ed9f..a179877 100644
--- a/configure.ac
+++ b/configure.ac
@@ -316,7 +316,7 @@
 
 # Check for Python
 
-AM_PATH_PYTHON
+AM_PATH_PYTHON([3.5])
 
 # If a Python interpreter of any color cannot be found, error out.
 
@@ -836,7 +836,7 @@
     fi
 fi
 if test "${with_happy}" != "no"; then
-    PYTHONPATH=${happy_path}:${PYTHONPATH} python -c 'import happy' 2> /dev/null
+    PYTHONPATH=${happy_path}:${PYTHONPATH} ${PYTHON} -c 'import happy' 2> /dev/null
     if test $? != 0; then
         if test "${with_happy}" = "yes"; then
             if test -z ${happy_path}; then
@@ -855,7 +855,7 @@
 fi
 if test "${with_happy}" = "yes"; then
     HAPPY_MINIMUM_VERSION="1.1.36"
-    happy_version=`PYTHONPATH=${happy_path}:${PYTHONPATH} ${PYTHON} -c 'import happy; print happy.__version__ if "__version__" in dir(happy) else "0.0.0"'`
+    happy_version=`PYTHONPATH=${happy_path}:${PYTHONPATH} ${PYTHON} -c 'import happy; print(happy.__version__) if "__version__" in dir(happy) else "0.0.0"'`
     AX_COMPARE_VERSION([${HAPPY_MINIMUM_VERSION}],[gt],[${happy_version}],[AC_MSG_ERROR(["The Nest Labs network functional test framework (Happy) is installed with version ${happy_version}; however, Weave test apps require at least version ${HAPPY_MINIMUM_VERSION}."])],[])
 fi
 AC_MSG_RESULT(${with_happy})
diff --git a/doc/guides/cross-network-inet-multicast-howto.md b/doc/guides/cross-network-inet-multicast-howto.md
index f4a80bc..ffca42c 100644
--- a/doc/guides/cross-network-inet-multicast-howto.md
+++ b/doc/guides/cross-network-inet-multicast-howto.md
@@ -20,7 +20,7 @@
 
 ```
 % git clone https://github.com/openweave/happy.git happy
-% sudo apt-get install bridge-utils python-lockfile python-psutil python-setuptools
+% sudo apt-get install bridge-utils python3-lockfile python3-pip python3-psutil python3-setuptools
 % cd happy
 % sudo make install
 ```
diff --git a/doc/specs/weave-message-format.pdf b/doc/specs/weave-message-format.pdf
new file mode 100644
index 0000000..9410c1c
--- /dev/null
+++ b/doc/specs/weave-message-format.pdf
Binary files differ
diff --git a/src/adaptations/device-layer/ESP32/AESBlockCipher.cpp b/src/adaptations/device-layer/ESP32/AESBlockCipher.cpp
index d22523b..ba77b06 100644
--- a/src/adaptations/device-layer/ESP32/AESBlockCipher.cpp
+++ b/src/adaptations/device-layer/ESP32/AESBlockCipher.cpp
@@ -30,6 +30,7 @@
 #include <Weave/Support/crypto/AESBlockCipher.h>
 
 #include <hwcrypto/aes.h>
+#include <esp_system.h>
 
 namespace nl {
 namespace Weave {
@@ -64,7 +65,11 @@
 
     esp_aes_init(&ctx);
     esp_aes_setkey(&ctx, mKey, kKeyLengthBits);
+#if ESP_IDF_VERSION_MAJOR > 3 || (ESP_IDF_VERSION_MAJOR == 3 && ESP_IDF_VERSION_MINOR >= 2)
+    esp_aes_crypt_ecb(&ctx, ESP_AES_ENCRYPT, inBlock, outBlock);
+#else
     esp_aes_encrypt(&ctx, inBlock, outBlock);
+#endif
     esp_aes_free(&ctx);
 }
 
@@ -79,7 +84,11 @@
 
     esp_aes_init(&ctx);
     esp_aes_setkey(&ctx, mKey, kKeyLengthBits);
+#if ESP_IDF_VERSION_MAJOR > 3 || (ESP_IDF_VERSION_MAJOR == 3 && ESP_IDF_VERSION_MINOR >= 2)
+    esp_aes_crypt_ecb(&ctx, ESP_AES_DECRYPT, inBlock, outBlock);
+#else
     esp_aes_decrypt(&ctx, inBlock, outBlock);
+#endif
     esp_aes_free(&ctx);
 }
 
@@ -109,7 +118,11 @@
 
     esp_aes_init(&ctx);
     esp_aes_setkey(&ctx, mKey, kKeyLengthBits);
+#if ESP_IDF_VERSION_MAJOR > 3 || (ESP_IDF_VERSION_MAJOR == 3 && ESP_IDF_VERSION_MINOR >= 2)
+    esp_aes_crypt_ecb(&ctx, ESP_AES_ENCRYPT, inBlock, outBlock);
+#else
     esp_aes_encrypt(&ctx, inBlock, outBlock);
+#endif
     esp_aes_free(&ctx);
 }
 
@@ -124,7 +137,11 @@
 
     esp_aes_init(&ctx);
     esp_aes_setkey(&ctx, mKey, kKeyLengthBits);
+#if ESP_IDF_VERSION_MAJOR > 3 || (ESP_IDF_VERSION_MAJOR == 3 && ESP_IDF_VERSION_MINOR >= 2)
+    esp_aes_crypt_ecb(&ctx, ESP_AES_DECRYPT, inBlock, outBlock);
+#else
     esp_aes_decrypt(&ctx, inBlock, outBlock);
+#endif
     esp_aes_free(&ctx);
 }
 
diff --git a/src/adaptations/device-layer/ESP32/ConfigurationManagerImpl.cpp b/src/adaptations/device-layer/ESP32/ConfigurationManagerImpl.cpp
index 5b7b30f..58e3299 100644
--- a/src/adaptations/device-layer/ESP32/ConfigurationManagerImpl.cpp
+++ b/src/adaptations/device-layer/ESP32/ConfigurationManagerImpl.cpp
@@ -239,6 +239,12 @@
         WeaveLogError(DeviceLayer, "esp_wifi_restore() failed: %s", nl::ErrorStr(err));
     }
 
+#if WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+    ThreadStackMgrImpl().LockThreadStack();
+    otInstanceFactoryReset(ThreadStackMgrImpl().OTInstance());
+    ThreadStackMgrImpl().UnlockThreadStack();
+#endif
+
     // Restart the system.
     WeaveLogProgress(DeviceLayer, "System restarting");
     esp_restart();
diff --git a/src/adaptations/device-layer/ESP32/ConnectivityManagerImpl.cpp b/src/adaptations/device-layer/ESP32/ConnectivityManagerImpl.cpp
index 93e26bd..cf9a516 100644
--- a/src/adaptations/device-layer/ESP32/ConnectivityManagerImpl.cpp
+++ b/src/adaptations/device-layer/ESP32/ConnectivityManagerImpl.cpp
@@ -30,6 +30,7 @@
 
 #include "esp_event.h"
 #include "esp_wifi.h"
+#include "esp_system.h"
 
 #include <lwip/ip_addr.h>
 #include <lwip/netif.h>
@@ -56,6 +57,10 @@
 #include <nest/trait/network/TelemetryNetworkWifiTrait.h>
 #endif
 
+#if WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+#include <Weave/DeviceLayer/internal/GenericConnectivityManagerImpl_Thread.ipp>
+#endif
+
 using namespace ::nl;
 using namespace ::nl::Weave;
 using namespace ::nl::Weave::TLV;
@@ -78,7 +83,11 @@
     if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled)
     {
         bool autoConnect;
-        mWiFiStationMode = (esp_wifi_get_auto_connect(&autoConnect) == ESP_OK && autoConnect)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+        WEAVE_ERROR err = esp_wifi_get_auto_connect(&autoConnect);
+#pragma GCC diagnostic pop
+        mWiFiStationMode = (err == ESP_OK && autoConnect)
                 ? kWiFiStationMode_Enabled
                 : kWiFiStationMode_Disabled;
     }
@@ -99,7 +108,10 @@
     if (val != kWiFiStationMode_ApplicationControlled)
     {
         bool autoConnect = (val == kWiFiStationMode_Enabled);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
         err = esp_wifi_set_auto_connect(autoConnect);
+#pragma GCC diagnostic pop
         SuccessOrExit(err);
 
         SystemLayer.ScheduleWork(DriveStationState, NULL);
@@ -390,6 +402,10 @@
     mWiFiAPIdleTimeoutMS = WEAVE_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT;
     mFlags = 0;
 
+#if WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+    GenericConnectivityManagerImpl_Thread<ConnectivityManagerImpl>::_Init();
+#endif 
+
     // Initialize the Weave Addressing and Routing Module.
     err = Warm::Init(FabricState);
     SuccessOrExit(err);
@@ -547,6 +563,10 @@
     }
 
 #endif // !WEAVE_DEVICE_CONFIG_DISABLE_ACCOUNT_PAIRING
+
+#if WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+    GenericConnectivityManagerImpl_Thread<ConnectivityManagerImpl>::_OnPlatformEvent(event);
+#endif // WEAVE_DEVICE_CONFIG_ENABLE_THREAD
 }
 
 void ConnectivityManagerImpl::_OnWiFiScanDone()
@@ -934,8 +954,13 @@
         if (netif != NULL && netif_is_up(netif) && netif_is_link_up(netif))
         {
             // Check if a DNS server is currently configured.  If so...
+#if ESP_IDF_VERSION_MAJOR > 3 || (ESP_IDF_VERSION_MAJOR == 3 && ESP_IDF_VERSION_MINOR >= 3)
+            const ip_addr_t* dnsServerAddr = dns_getserver(0);
+            if (!ip_addr_isany_val(*dnsServerAddr))
+#else
             ip_addr_t dnsServerAddr = dns_getserver(0);
             if (!ip_addr_isany_val(dnsServerAddr))
+#endif
             {
                 // If the station interface has been assigned an IPv4 address, and has
                 // an IPv4 gateway, then presume that the device has IPv4 Internet
diff --git a/src/adaptations/device-layer/ESP32/ThreadStackManagerImpl.cpp b/src/adaptations/device-layer/ESP32/ThreadStackManagerImpl.cpp
new file mode 100644
index 0000000..1de93af
--- /dev/null
+++ b/src/adaptations/device-layer/ESP32/ThreadStackManagerImpl.cpp
@@ -0,0 +1,146 @@
+/*
+ *
+ *    Copyright (c) 2019 Nest Labs, Inc.
+ *    All rights reserved.
+ *
+ *    Licensed under the Apache License, Version 2.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+/**
+ *    @file     
+ *          Provides an implementation of the ThreadStackManager object for
+ *          ESP32 platforms using the ESP-IDF SDK and the OpenThread
+ *          stack.
+ *
+ */
+
+#include <Weave/DeviceLayer/internal/WeaveDeviceLayerInternal.h>
+
+#if WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+
+#include <Weave/DeviceLayer/ThreadStackManager.h>
+#include <Weave/DeviceLayer/OpenThread/OpenThreadUtils.h>
+
+#include <Weave/DeviceLayer/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.ipp>
+#include <Weave/DeviceLayer/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.ipp>
+
+#include <openthread/cli.h>
+
+#include <openthread/openthread-esp32.h>
+
+namespace nl {
+namespace Weave {
+namespace DeviceLayer {
+
+using namespace ::nl::Weave::DeviceLayer::Internal;
+
+namespace Internal {
+
+// Specialize ESP32 ThreadStackManagerImpl's ThreadTaskMain since OpenThread on ESP32 is using a RCP for thread support.
+template<>
+void GenericThreadStackManagerImpl_FreeRTOS<ThreadStackManagerImpl>::ThreadTaskMain(void * arg)
+{
+    GenericThreadStackManagerImpl_FreeRTOS<ThreadStackManagerImpl> * self =
+            static_cast<GenericThreadStackManagerImpl_FreeRTOS<ThreadStackManagerImpl>*>(arg);
+
+    VerifyOrDie(self->mThreadTask == NULL);
+
+    WeaveLogDetail(DeviceLayer, "Thread task running");
+
+    // Capture the Thread task handle.
+    self->mThreadTask = xTaskGetCurrentTaskHandle();
+
+    ThreadStackMgr().LockThreadStack();
+    otInstance *instance = ThreadStackMgrImpl().OTInstance();
+    ThreadStackMgr().UnlockThreadStack();
+    
+
+    while (true)
+    {
+        otSysMainloopContext mainloop;
+ 
+        otSysMainloopInit(&mainloop);
+
+        ThreadStackMgr().LockThreadStack();
+        otTaskletsProcess(instance);
+        otSysMainloopUpdate(instance, &mainloop);
+        ThreadStackMgr().UnlockThreadStack();
+ 
+        if (otSysMainloopPoll(&mainloop) >= 0)
+        {
+            ThreadStackMgr().LockThreadStack();
+            otSysMainloopProcess(instance, &mainloop);
+            ThreadStackMgr().UnlockThreadStack();
+        }
+        else
+        {
+            WeaveLogError(DeviceLayer, "OpenThread system polling failed");
+            abort();
+        }
+    }
+}
+
+}
+
+ThreadStackManagerImpl ThreadStackManagerImpl::sInstance;
+
+WEAVE_ERROR ThreadStackManagerImpl::_InitThreadStack(void)
+{
+    return InitThreadStack(NULL);
+}
+
+WEAVE_ERROR ThreadStackManagerImpl::InitThreadStack(otInstance *otInst)
+{
+    WEAVE_ERROR err = WEAVE_NO_ERROR;
+
+    // Initialize the generic implementation base classes.
+    err = GenericThreadStackManagerImpl_FreeRTOS<ThreadStackManagerImpl>::DoInit();
+    SuccessOrExit(err);
+    err = GenericThreadStackManagerImpl_OpenThread_LwIP<ThreadStackManagerImpl>::DoInit(otInst);
+    SuccessOrExit(err);
+
+exit:
+    return err;
+}
+
+bool ThreadStackManagerImpl::IsInitialized()
+{
+    return sInstance.mThreadStackLock != NULL;
+}
+
+} // namespace DeviceLayer
+} // namespace Weave
+} // namespace nl
+
+using namespace ::nl::Weave::DeviceLayer;
+
+/**
+ * Glue function called directly by the OpenThread stack when tasklet processing work
+ * is pending.
+ */
+extern "C" void otTaskletsSignalPending(otInstance *p_instance)
+{
+    ThreadStackMgrImpl().SignalThreadActivityPending();
+}
+
+/**
+ * Glue function called directly by the OpenThread stack when system event processing work
+ * is pending.
+ */
+extern "C" void otSysEventSignalPending(void)
+{
+    BaseType_t yieldRequired = ThreadStackMgrImpl().SignalThreadActivityPendingFromISR();
+    if (yieldRequired) portYIELD_FROM_ISR();
+}
+
+#endif // WEAVE_DEVICE_CONFIG_ENABLE_THREAD
diff --git a/src/adaptations/device-layer/LwIP/WarmSupport.cpp b/src/adaptations/device-layer/LwIP/WarmSupport.cpp
index ffdac91..9dd5fd9 100644
--- a/src/adaptations/device-layer/LwIP/WarmSupport.cpp
+++ b/src/adaptations/device-layer/LwIP/WarmSupport.cpp
@@ -448,8 +448,6 @@
 
     ThreadStackMgrImpl().LockThreadStack();
 
-    otBorderRouterRegister(ThreadStackMgrImpl().OTInstance());
-
     memcpy(routeConfig.mPrefix.mPrefix.mFields.m8, inPrefix.IPAddr.Addr, sizeof(routeConfig.mPrefix.mPrefix.mFields));
     routeConfig.mPrefix.mLength = inPrefix.Length;
     routeConfig.mStable = true;
@@ -464,6 +462,8 @@
         otErr = otBorderRouterRemoveRoute(ThreadStackMgrImpl().OTInstance(), &routeConfig.mPrefix);
     }
 
+    otBorderRouterRegister(ThreadStackMgrImpl().OTInstance());
+
     ThreadStackMgrImpl().UnlockThreadStack();
 
     if (otErr == OT_ERROR_NONE)
diff --git a/src/adaptations/device-layer/Makefile.am b/src/adaptations/device-layer/Makefile.am
index 2ac0c8f..a6da4a6 100644
--- a/src/adaptations/device-layer/Makefile.am
+++ b/src/adaptations/device-layer/Makefile.am
@@ -47,6 +47,7 @@
     include/Weave/DeviceLayer/ESP32/SoftwareUpdateManagerImpl.h \
     include/Weave/DeviceLayer/ESP32/WeaveDevicePlatformEvent.h \
     include/Weave/DeviceLayer/ESP32/NetworkProvisioningServerImpl.h \
+    include/Weave/DeviceLayer/ESP32/ThreadStackManagerImpl.h \
     include/Weave/DeviceLayer/nRF5/ConfigurationManagerImpl.h \
     include/Weave/DeviceLayer/nRF5/PlatformManagerImpl.h \
     include/Weave/DeviceLayer/nRF5/nRF5Config.h \
@@ -169,6 +170,8 @@
     ESP32/PlatformManagerImpl.cpp               \
     ESP32/SoftwareUpdateManagerImpl.cpp         \
     ESP32/SystemTimeSupport.cpp                 \
+    ESP32/ThreadStackManagerImpl.cpp            \ 
+    OpenThread/OpenThreadUtils.cpp              \
     LwIP/WarmSupport.cpp                        \
     $(NULL)
 
diff --git a/src/adaptations/device-layer/OpenThread/OpenThreadUtils.cpp b/src/adaptations/device-layer/OpenThread/OpenThreadUtils.cpp
index e7809ec..3252c9a 100644
--- a/src/adaptations/device-layer/OpenThread/OpenThreadUtils.cpp
+++ b/src/adaptations/device-layer/OpenThread/OpenThreadUtils.cpp
@@ -23,6 +23,9 @@
 
 
 #include <Weave/DeviceLayer/internal/WeaveDeviceLayerInternal.h>
+
+#if WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+
 #include <Weave/DeviceLayer/OpenThread/OpenThreadUtils.h>
 
 #include <openthread/error.h>
@@ -276,3 +279,5 @@
 } // namespace DeviceLayer
 } // namespace Weave
 } // namespace nl
+
+#endif // WEAVE_DEVICE_CONFIG_ENABLE_THREAD
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/ConnectivityManagerImpl.h b/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/ConnectivityManagerImpl.h
index 21f48ab..c244dc6 100644
--- a/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/ConnectivityManagerImpl.h
+++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/ConnectivityManagerImpl.h
@@ -26,6 +26,11 @@
 #else
 #include <Weave/DeviceLayer/internal/GenericConnectivityManagerImpl_NoBLE.h>
 #endif
+#if WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+#include <Weave/DeviceLayer/internal/GenericConnectivityManagerImpl_Thread.h>
+#else
+#include <Weave/DeviceLayer/internal/GenericConnectivityManagerImpl_NoThread.h>
+#endif
 #include <Weave/DeviceLayer/internal/GenericConnectivityManagerImpl_NoThread.h>
 #include <Weave/Profiles/network-provisioning/NetworkProvisioning.h>
 #include <Weave/Profiles/weave-tunneling/WeaveTunnelCommon.h>
@@ -64,7 +69,11 @@
 #else
       public Internal::GenericConnectivityManagerImpl_NoBLE<ConnectivityManagerImpl>,
 #endif
+#if WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+      public Internal::GenericConnectivityManagerImpl_Thread<ConnectivityManagerImpl>
+#else
       public Internal::GenericConnectivityManagerImpl_NoThread<ConnectivityManagerImpl>
+#endif
 {
     using TunnelConnNotifyReasons = ::nl::Weave::Profiles::WeaveTunnel::WeaveTunnelConnectionMgr::TunnelConnNotifyReasons;
 
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/ThreadStackManagerImpl.h b/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/ThreadStackManagerImpl.h
new file mode 100644
index 0000000..dd51d57
--- /dev/null
+++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/ThreadStackManagerImpl.h
@@ -0,0 +1,124 @@
+/*
+ *
+ *    Copyright (c) 2019 Nest Labs, Inc.
+ *    All rights reserved.
+ *
+ *    Licensed under the Apache License, Version 2.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+/**
+ *    @file
+ *          Provides an implementation of the ThreadStackManager object
+ *          for ESP32 platforms using the ESP-IDF SDK and the OpenThread
+ *          stack.
+ */
+
+#ifndef THREAD_STACK_MANAGER_IMPL_H
+#define THREAD_STACK_MANAGER_IMPL_H
+
+#include <Weave/DeviceLayer/ESP32/WeaveDevicePlatformConfig.h>
+
+#if WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+#include <Weave/DeviceLayer/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.h>
+#include <Weave/DeviceLayer/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.h>
+
+#include <openthread/thread.h>
+#include <openthread/tasklet.h>
+
+extern "C" void otSysEventSignalPending(void);
+
+namespace nl {
+namespace Weave {
+namespace DeviceLayer {
+
+class ThreadStackManager;
+class ThreadStackManagerImpl;
+
+/**
+ * Concrete implementation of the ThreadStackManager singleton object for ESP32 platforms
+ * using the ESP-IDF SDK and the OpenThread stack.
+ */
+class ThreadStackManagerImpl final
+    : public ThreadStackManager,
+      public Internal::GenericThreadStackManagerImpl_OpenThread_LwIP<ThreadStackManagerImpl>,
+      public Internal::GenericThreadStackManagerImpl_FreeRTOS<ThreadStackManagerImpl>
+{
+    // Allow the ThreadStackManager interface class to delegate method calls to
+    // the implementation methods provided by this class.
+    friend class ThreadStackManager;
+
+    // Allow the generic implementation base classes to call helper methods on
+    // this class.
+    friend Internal::GenericThreadStackManagerImpl_OpenThread<ThreadStackManagerImpl>;
+    friend Internal::GenericThreadStackManagerImpl_OpenThread_LwIP<ThreadStackManagerImpl>;
+    friend Internal::GenericThreadStackManagerImpl_FreeRTOS<ThreadStackManagerImpl>;
+
+    // Allow glue functions called by OpenThread to call helper methods on this
+    // class.
+    friend void ::otTaskletsSignalPending(otInstance *otInst);
+    friend void ::otSysEventSignalPending(void);
+
+public:
+    // ===== Platform-specific members that may be accessed directly by the application.
+
+    using ThreadStackManager::InitThreadStack;
+    WEAVE_ERROR InitThreadStack(otInstance *otInst);
+
+private:
+    // ===== Methods that implement the ThreadStackManager abstract interface.
+
+    WEAVE_ERROR _InitThreadStack(void);
+
+    // ===== Members for internal use by the following friends.
+
+    friend ThreadStackManager & ::nl::Weave::DeviceLayer::ThreadStackMgr(void);
+    friend ThreadStackManagerImpl & ::nl::Weave::DeviceLayer::ThreadStackMgrImpl(void);
+
+    static ThreadStackManagerImpl sInstance;
+
+    static bool IsInitialized();
+
+    // ===== Private members for use by this class only.
+
+    ThreadStackManagerImpl() = default;
+};
+
+/**
+ * Returns the public interface of the ThreadStackManager singleton object.
+ *
+ * Weave applications should use this to access features of the ThreadStackManager object
+ * that are common to all platforms.
+ */
+inline ThreadStackManager &ThreadStackMgr(void)
+{
+    return ThreadStackManagerImpl::sInstance;
+}
+
+/**
+ * Returns the platform-specific implementation of the ThreadStackManager singleton object.
+ *
+ * Weave applications can use this to gain access to features of the ThreadStackManager
+ * that are specific to ESP32 platforms.
+ */
+inline ThreadStackManagerImpl &ThreadStackMgrImpl(void)
+{
+    return ThreadStackManagerImpl::sInstance;
+}
+
+} // namespace DeviceLayer
+} // namespace Weave
+} // namespace nl
+
+#endif // WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+
+#endif // THREAD_STACK_MANAGER_IMPL_H
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/WarmPlatformConfig.h b/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/WarmPlatformConfig.h
index bdb644b..f34539b 100644
--- a/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/WarmPlatformConfig.h
+++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/WarmPlatformConfig.h
@@ -28,8 +28,8 @@
 
 // ==================== Platform Adaptations ====================
 
-#define WARM_CONFIG_SUPPORT_THREAD 0
-#define WARM_CONFIG_SUPPORT_THREAD_ROUTING 0
+#define WARM_CONFIG_SUPPORT_THREAD CONFIG_WEAVE_DEVICE_CONFIG_ENABLE_THREAD
+#define WARM_CONFIG_SUPPORT_THREAD_ROUTING CONFIG_WEAVE_DEVICE_CONFIG_ENABLE_THREAD
 #define WARM_CONFIG_SUPPORT_LEGACY6LOWPAN_NETWORK 0
 #define WARM_CONFIG_SUPPORT_WIFI 1
 #define WARM_CONFIG_SUPPORT_CELLULAR 0
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/WeaveDevicePlatformConfig.h b/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/WeaveDevicePlatformConfig.h
index b1897df..9ab801a 100644
--- a/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/WeaveDevicePlatformConfig.h
+++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/ESP32/WeaveDevicePlatformConfig.h
@@ -33,7 +33,9 @@
 
 // The following values are configured via the ESP-IDF Kconfig mechanism.
 
+#define WEAVE_DEVICE_CONFIG_ENABLE_THREAD CONFIG_WEAVE_DEVICE_CONFIG_ENABLE_THREAD
 #define WEAVE_DEVICE_CONFIG_WEAVE_TASK_STACK_SIZE CONFIG_WEAVE_TASK_STACK_SIZE
+#define WEAVE_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE CONFIG_THREAD_TASK_STACK_SIZE
 #define WEAVE_DEVICE_CONFIG_WEAVE_TASK_PRIORITY CONFIG_WEAVE_TASK_PRIORITY
 #define WEAVE_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE CONFIG_MAX_EVENT_QUEUE_SIZE
 #define WEAVE_DEVICE_CONFIG_SERVICE_DIRECTORY_CACHE_SIZE CONFIG_SERVICE_DIRECTORY_CACHE_SIZE
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.ipp b/src/adaptations/device-layer/include/Weave/DeviceLayer/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.ipp
index fb11dc5..e1a1505 100644
--- a/src/adaptations/device-layer/include/Weave/DeviceLayer/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.ipp
+++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.ipp
@@ -42,7 +42,7 @@
 {
     WEAVE_ERROR err = WEAVE_NO_ERROR;
 
-    mThreadStackLock = xSemaphoreCreateMutex();
+    mThreadStackLock = xSemaphoreCreateRecursiveMutex();
     if (mThreadStackLock == NULL)
     {
         WeaveLogError(DeviceLayer, "Failed to create Thread stack lock");
@@ -78,19 +78,19 @@
 template<class ImplClass>
 void GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::_LockThreadStack(void)
 {
-    xSemaphoreTake(mThreadStackLock, portMAX_DELAY);
+    xSemaphoreTakeRecursive(mThreadStackLock, portMAX_DELAY);
 }
 
 template<class ImplClass>
 bool GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::_TryLockThreadStack(void)
 {
-    return xSemaphoreTake(mThreadStackLock, 0) == pdTRUE;
+    return xSemaphoreTakeRecursive(mThreadStackLock, 0) == pdTRUE;
 }
 
 template<class ImplClass>
 void GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::_UnlockThreadStack(void)
 {
-    xSemaphoreGive(mThreadStackLock);
+    xSemaphoreGiveRecursive(mThreadStackLock);
 }
 
 template<class ImplClass>
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/OpenThread/GenericThreadStackManagerImpl_OpenThread.ipp b/src/adaptations/device-layer/include/Weave/DeviceLayer/OpenThread/GenericThreadStackManagerImpl_OpenThread.ipp
index 3e7bd9d..bfe0831 100644
--- a/src/adaptations/device-layer/include/Weave/DeviceLayer/OpenThread/GenericThreadStackManagerImpl_OpenThread.ipp
+++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/OpenThread/GenericThreadStackManagerImpl_OpenThread.ipp
@@ -53,11 +53,11 @@
 namespace Internal {
 
 // Assert some presumptions in this code
-static_assert(DeviceNetworkInfo::kMaxThreadNetworkNameLength == OT_NETWORK_NAME_MAX_SIZE);
-static_assert(DeviceNetworkInfo::kThreadExtendedPANIdLength == OT_EXT_PAN_ID_SIZE);
-static_assert(DeviceNetworkInfo::kThreadMeshPrefixLength == OT_MESH_LOCAL_PREFIX_SIZE);
-static_assert(DeviceNetworkInfo::kThreadNetworkKeyLength == OT_MASTER_KEY_SIZE);
-static_assert(DeviceNetworkInfo::kThreadPSKcLength == OT_PSKC_MAX_SIZE);
+static_assert(DeviceNetworkInfo::kMaxThreadNetworkNameLength == OT_NETWORK_NAME_MAX_SIZE, "ERROR");
+static_assert(DeviceNetworkInfo::kThreadExtendedPANIdLength == OT_EXT_PAN_ID_SIZE, "ERROR");
+static_assert(DeviceNetworkInfo::kThreadMeshPrefixLength == OT_MESH_LOCAL_PREFIX_SIZE, "ERROR");
+static_assert(DeviceNetworkInfo::kThreadNetworkKeyLength == OT_MASTER_KEY_SIZE, "ERROR");
+static_assert(DeviceNetworkInfo::kThreadPSKcLength == OT_PSKC_MAX_SIZE, "ERROR");
 
 // Fully instantiate the generic implementation class in whatever compilation unit includes this file.
 template class GenericThreadStackManagerImpl_OpenThread<ThreadStackManagerImpl>;
@@ -290,19 +290,19 @@
             memcpy(netInfo.ThreadNetworkKey, activeDataset.mMasterKey.m8, sizeof(netInfo.ThreadNetworkKey));
             netInfo.FieldPresent.ThreadNetworkKey = true;
         }
-#ifdef EFR32_OPENTHREAD_API
+#if defined(EFR32_OPENTHREAD_API) || defined(OPENTHREAD_API_VERSION)
         if (activeDataset.mComponents.mIsPskcPresent)
         {
             memcpy(netInfo.ThreadPSKc, activeDataset.mPskc.m8, sizeof(netInfo.ThreadPSKc));
             netInfo.FieldPresent.ThreadPSKc = true;
         }
-#else // !EFR32_OPENTHREAD_API
+#else // !EFR32_OPENTHREAD_API && !OPENTHREAD_API_VERSION
         if (activeDataset.mComponents.mIsPSKcPresent)
         {
             memcpy(netInfo.ThreadPSKc, activeDataset.mPSKc.m8, sizeof(netInfo.ThreadPSKc));
             netInfo.FieldPresent.ThreadPSKc = true;
         }
-#endif // !EFR32_OPENTHREAD_API
+#endif // !EFR32_OPENTHREAD_API && !OPENTHREAD_API_VERSION
     }
     if (activeDataset.mComponents.mIsPanIdPresent)
     {
@@ -350,13 +350,13 @@
     }
     if (netInfo.FieldPresent.ThreadPSKc)
     {
-#ifdef EFR32_OPENTHREAD_API
+#if defined(EFR32_OPENTHREAD_API) || defined(OPENTHREAD_API_VERSION)
         memcpy(newDataset.mPskc.m8, netInfo.ThreadPSKc, sizeof(newDataset.mPskc.m8));
         newDataset.mComponents.mIsPskcPresent = true;
-#else // !EFR32_OPENTHREAD_API
+#else // !EFR32_OPENTHREAD_API && !OPENTHREAD_API_VERSION
         memcpy(newDataset.mPSKc.m8, netInfo.ThreadPSKc, sizeof(newDataset.mPSKc.m8));
         newDataset.mComponents.mIsPSKcPresent = true;
-#endif // !EFR32_OPENTHREAD_API
+#endif // !EFR32_OPENTHREAD_API && !OPENTHREAD_API_VERSION
     }
     if (netInfo.ThreadPANId != kThreadPANId_NotSpecified)
     {
@@ -401,11 +401,11 @@
 
     if (linkMode.mDeviceType)
     {
-#ifdef EFR32_OPENTHREAD_API
+#if defined(EFR32_OPENTHREAD_API) || defined(OPENTHREAD_API_VERSION)
         if (otThreadIsRouterEligible(mOTInst))
-#else // !EFR32_OPENTHREAD_API
+#else // !EFR32_OPENTHREAD_API && !OPENTHREAD_API_VERSION
         if (otThreadIsRouterRoleEnabled(mOTInst))
-#endif // !EFR32_OPENTHREAD_API
+#endif // !EFR32_OPENTHREAD_API && !OPENTHREAD_API_VERSION
         {
             deviceType = ConnectivityManager::kThreadDeviceType_Router;
         }
@@ -480,11 +480,11 @@
     case ConnectivityManager::kThreadDeviceType_FullEndDevice:
         linkMode.mDeviceType = true;
         linkMode.mRxOnWhenIdle = true;
-#ifdef EFR32_OPENTHREAD_API
+#if defined(EFR32_OPENTHREAD_API) || defined(OPENTHREAD_API_VERSION)
         otThreadSetRouterEligible(mOTInst, deviceType == ConnectivityManager::kThreadDeviceType_Router);
-#else // !EFR32_OPENTHREAD_API
+#else // !EFR32_OPENTHREAD_API && !OPENTHREAD_API_VERSION
         otThreadSetRouterRoleEnabled(mOTInst, deviceType == ConnectivityManager::kThreadDeviceType_Router);
-#endif // !EFR32_OPENTHREAD_API
+#endif // !EFR32_OPENTHREAD_API && !OPENTHREAD_API_VERSION
         break;
     case ConnectivityManager::kThreadDeviceType_MinimalEndDevice:
         linkMode.mDeviceType = false;
@@ -946,7 +946,7 @@
             neighborTopoEvent.SetTimeoutPresent();
             neighborTopoEvent.SetNetworkDataVersionPresent();
 
-            snprintf(printBuf, TELEM_PRINT_BUFFER_SIZE, ", Timeout: %10lu NetworkDataVersion: %3d",
+            snprintf(printBuf, TELEM_PRINT_BUFFER_SIZE, ", Timeout: %10" PRIu32 " NetworkDataVersion: %3d",
                                neighborTopoEvent.timeout, neighborTopoEvent.networkDataVersion);
         }
         else
@@ -1020,9 +1020,23 @@
     // create or acquire a singleton instance of OpenThread.
     if (otInst == NULL)
     {
+#if defined(WEAVE_DEVICE_LAYER_TARGET_ESP32) && WEAVE_DEVICE_LAYER_TARGET_ESP32
+        WeaveLogError(DeviceLayer, "otInstance is not supplied, create a new instance");
+        size_t instanceSize = 0;
+
+        // Get the instance size.
+        otInstanceInit(NULL, &instanceSize);
+        void *instanceBuffer = malloc(instanceSize);
+        otInst = otInstanceInit(instanceBuffer, &instanceSize);
+#else
         otInst = otInstanceInitSingle();
+#endif
         VerifyOrExit(otInst != NULL, err = MapOpenThreadError(OT_ERROR_FAILED));
     }
+    else
+    {
+        WeaveLogError(DeviceLayer, "Using existing otInstance: %p", otInst);
+    }
 
     mOTInst = otInst;
 
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.ipp b/src/adaptations/device-layer/include/Weave/DeviceLayer/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.ipp
index 082c1e8..1b7d6d7 100644
--- a/src/adaptations/device-layer/include/Weave/DeviceLayer/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.ipp
+++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.ipp
@@ -248,7 +248,7 @@
                 uint8_t state = netif_ip6_addr_state(mNetIf, addrIdx);
                 if (state != IP6_ADDR_INVALID)
                 {
-                    IPAddress addr = IPAddress::FromLwIPAddr(*netif_ip6_addr(mNetIf, addrIdx));
+                    IPAddress addr = IPAddress::FromLwIPAddr(*netif_ip_addr6(mNetIf, addrIdx));
                     char addrStr[50];
                     addr.ToString(addrStr, sizeof(addrStr));
                     const char * typeStr;
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp b/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp
index c5bed46..6bcb81f 100644
--- a/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp
+++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp
@@ -897,7 +897,7 @@
     // Verify a valid Thread channel was specified.
     if (netInfo.ThreadChannel != kThreadChannel_NotSpecified)
     {
-        if (netInfo.ThreadChannel < 11 && netInfo.ThreadChannel > 26)
+        if (netInfo.ThreadChannel < 11 || netInfo.ThreadChannel > 26)
         {
             statusProfileId = kWeaveProfile_NetworkProvisioning;
             statusCode = kStatusCode_InvalidNetworkConfiguration;
diff --git a/src/device-manager/WeaveDeviceManager.cpp b/src/device-manager/WeaveDeviceManager.cpp
index eb4937a..40bae70 100644
--- a/src/device-manager/WeaveDeviceManager.cpp
+++ b/src/device-manager/WeaveDeviceManager.cpp
@@ -3513,6 +3513,11 @@
         devMgr->mOnConnectionClosedFunc(devMgr, devMgr->mOnConnectionClosedAppReq, con, conErr);
     }
 
+    if (conErr != WEAVE_NO_ERROR && devMgr->mOnError)
+    {
+        devMgr->mOnError(devMgr, devMgr->mAppReqState, conErr, NULL);
+    }
+
     WeaveLogProgress(DeviceManager, "Connection to device closed");
 }
 
diff --git a/src/device-manager/python/openweave/WeaveCoreBluetoothMgr.py b/src/device-manager/python/openweave/WeaveCoreBluetoothMgr.py
index f5b816b..1bde748 100644
--- a/src/device-manager/python/openweave/WeaveCoreBluetoothMgr.py
+++ b/src/device-manager/python/openweave/WeaveCoreBluetoothMgr.py
@@ -45,9 +45,12 @@
 
 from .WeaveBleBase import WeaveBleBase
 
-
-objc.loadBundle("CoreBluetooth", globals(),
-    bundle_path=objc.pathForFramework(u'/System/Library/Frameworks/IOBluetooth.framework/Versions/A/Frameworks/CoreBluetooth.framework'))
+try:
+    objc.loadBundle("CoreBluetooth", globals(),
+                    bundle_path=objc.pathForFramework(u'/System/Library/Frameworks/IOBluetooth.framework/Versions/A/Frameworks/CoreBluetooth.framework'))
+except:
+    objc.loadBundle("CoreBluetooth", globals(),
+                    bundle_path=objc.pathForFramework(u'/System/Library/Frameworks/CoreBluetooth.framework'))
 
 weave_service = CBUUID.UUIDWithString_(u'0000FEAF-0000-1000-8000-00805F9B34FB')
 weave_service_short = CBUUID.UUIDWithString_(u'FEAF')
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 17f79ca..ce0d22c 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -1011,6 +1011,7 @@
 $(nl_public_WeaveDeviceLayer_source_dirstem)/ESP32/PlatformManagerImpl.h                            \
 $(nl_public_WeaveDeviceLayer_source_dirstem)/ESP32/SoftwareUpdateManagerImpl.h                      \
 $(nl_public_WeaveDeviceLayer_source_dirstem)/ESP32/SystemPlatformConfig.h                           \
+$(nl_public_WeaveDeviceLayer_source_dirstem)/ESP32/ThreadStackManagerImpl.h                          \
 $(nl_public_WeaveDeviceLayer_source_dirstem)/ESP32/WarmPlatformConfig.h                             \
 $(nl_public_WeaveDeviceLayer_source_dirstem)/ESP32/WeaveDevicePlatformConfig.h                      \
 $(nl_public_WeaveDeviceLayer_source_dirstem)/ESP32/WeaveDevicePlatformEvent.h                       \
diff --git a/src/inet/DNSResolver.cpp b/src/inet/DNSResolver.cpp
index 126941e..7512827 100644
--- a/src/inet/DNSResolver.cpp
+++ b/src/inet/DNSResolver.cpp
@@ -36,9 +36,9 @@
 #include <lwip/dns.h>
 #include <lwip/tcpip.h>
 
-#if LWIP_VERSION_MAJOR < 2
+#ifndef LWIP_DNS_FOUND_CALLBACK_TYPE
 #define LWIP_DNS_FOUND_CALLBACK_TYPE    dns_found_callback
-#endif // LWIP_VERSION_MAJOR < 2
+#endif
 #endif // WEAVE_SYSTEM_CONFIG_USE_LWIP
 
 #if WEAVE_SYSTEM_CONFIG_USE_SOCKETS
diff --git a/src/inet/TunEndPoint.cpp b/src/inet/TunEndPoint.cpp
index 2e9ec8d..785a18c 100644
--- a/src/inet/TunEndPoint.cpp
+++ b/src/inet/TunEndPoint.cpp
@@ -549,12 +549,12 @@
     INET_ERROR              err             = INET_NO_ERROR;
     TunEndPoint*            ep              = static_cast<TunEndPoint *>(netif->state);
     Weave::System::Layer&   lSystemLayer    = ep->SystemLayer();
-    PacketBuffer*           buf             = PacketBuffer::NewWithAvailableSize(p->tot_len);
 
-    // Starting off with a reserved size of the default WEAVE_SYSTEM_CONFIG_HEADER_RESERVE_SIZE
-    // which allows for adding the Weave header and the underlying transport and IP headers
-    // encapsulating this tunneled packet.
-
+    // Allocate space for the tunneled IP packet. The reserved space will be the
+    // default for the Weave and underlying TCP/IP headers (WEAVE_SYSTEM_CONFIG_HEADER_RESERVE_SIZE).
+    // The requested data size will include the full pbuf received from LwIP plus
+    // WEAVE_TRAILER_RESERVE_SIZE for holding the HMAC.
+    PacketBuffer* buf = PacketBuffer::NewWithAvailableSize(p->tot_len + WEAVE_TRAILER_RESERVE_SIZE);
     VerifyOrExit(buf != NULL, lwipErr = ERR_MEM);
 
     buf->SetDataLength(p->tot_len);
diff --git a/src/lib/core/WeaveCircularTLVBuffer.h b/src/lib/core/WeaveCircularTLVBuffer.h
index 5d8b22f..294da6b 100644
--- a/src/lib/core/WeaveCircularTLVBuffer.h
+++ b/src/lib/core/WeaveCircularTLVBuffer.h
@@ -70,6 +70,8 @@
     inline size_t AvailableDataLength(void) const { return mQueueSize - mQueueLength; };
     inline size_t GetQueueSize(void) const { return mQueueSize; };
     inline uint8_t *GetQueue(void) const { return mQueue; };
+    inline void SetQueueHead(uint8_t *aQueueHead) { mQueueHead = aQueueHead; };
+    inline void SetQueueLength(size_t aQueueLength) { mQueueLength = aQueueLength; };
 
     WEAVE_ERROR EvictHead(void);
 
diff --git a/src/lib/core/WeaveConnection.cpp b/src/lib/core/WeaveConnection.cpp
index 1219cca..6a4cff4 100644
--- a/src/lib/core/WeaveConnection.cpp
+++ b/src/lib/core/WeaveConnection.cpp
@@ -1403,10 +1403,50 @@
         msgInfo.InPacketInfo = &packetInfo;
         msgInfo.InCon = con;
 
-        // Attempt to parse an message from the head of the received data.
+        // Attempt to parse an message from the head of the received queue.
         err = msgLayer->DecodeMessageWithLength(data, con->PeerNodeId, con, &msgInfo, &payload, &payloadLen, &frameLen);
 
-        // If the data buffer contains only part of a message...
+        // If the initial buffer in the receive queue is not big enough to hold the entirety of
+        // the incoming message...
+        if (err == WEAVE_ERROR_MESSAGE_TOO_LONG)
+        {
+            // The Weave message decoding logic expects message data to be in contiguous memory.
+            // Therefore, if the packet buffer containing the initial portion of the message is
+            // not big enough to hold the entirety of the message, the data must be moved into
+            // a new buffer that is big enough.
+            //
+            // This situation can arise, for example, when when a TCP segment arrives containing
+            // part of a Weave message and the underlying network interface chooses to place the
+            // packet into a buffer that is smaller than the Weave message.
+            //
+            // Note that the logic here implies that when a system runs low on buffers, message
+            // reception can fail for lack of an appropriately sized buffer, resulting in the TCP
+            // connection being aborted.  The only way to avoid this is for the underlying network
+            // interface to always place packets into buffers that are big enough to hold the
+            // maximum size Weave message. If such a buffer is not available when a packet comes
+            // in, the network interface can simply discard the packet, resulting in the peer
+            // retransmitting it and the system recovering gracefully once the buffer pressure
+            // subsides.
+
+            // Attempt to allocate a buffer big enough to hold the entire message.  Fail with
+            // WEAVE_ERROR_MESSAGE_TOO_LONG if no such buffer is available.
+            PacketBuffer * newBuf = PacketBuffer::NewWithAvailableSize(0, frameLen);
+            if (newBuf == NULL)
+            {
+                break;
+            }
+
+            // Prepend the new buffer to the receive queue and copy the received message data into
+            // the new buffer, discarding the original buffer(s).
+            newBuf->AddToEnd(data);
+            data = newBuf;
+            data->CompactHead();
+
+            // Try again to decode the message.
+            continue;
+        }
+
+        // If the initial buffer in the receive queue contains only part of the next message...
         if (err == WEAVE_ERROR_MESSAGE_INCOMPLETE)
         {
             // If there are more buffers in the queue, move as much data as possible into the head buffer
diff --git a/src/lib/core/WeaveTLV.h b/src/lib/core/WeaveTLV.h
index 04fbdd5..1a631f6 100644
--- a/src/lib/core/WeaveTLV.h
+++ b/src/lib/core/WeaveTLV.h
@@ -222,6 +222,7 @@
     // *** See WeaveTLVWriter.cpp file for API documentation ***
 
     void Init(uint8_t *buf, uint32_t maxLen);
+    void InitMalloced(uint8_t *& outBuf, uint32_t initialBufSize = 256, uint32_t maxLen = 0xFFFFFFFFUL);
     void Init(PacketBuffer *buf, uint32_t maxLen = 0xFFFFFFFFUL);
     void Init(PacketBuffer *buf, uint32_t maxLen, bool allowDiscontiguousBuffers);
 
@@ -247,6 +248,8 @@
     WEAVE_ERROR Put(uint64_t tag, double v);
     WEAVE_ERROR PutBoolean(uint64_t tag, bool v);
     WEAVE_ERROR PutBytes(uint64_t tag, const uint8_t *buf, uint32_t len);
+    WEAVE_ERROR StartPutBytes(uint64_t tag, uint32_t totalLen);
+    WEAVE_ERROR ContinuePutBytes(const uint8_t *buf, uint32_t len);
     WEAVE_ERROR PutString(uint64_t tag, const char *buf);
     WEAVE_ERROR PutString(uint64_t tag, const char *buf, uint32_t len);
     WEAVE_ERROR PutStringF(uint64_t tag, const char *fmt, ...);
@@ -283,6 +286,9 @@
     static WEAVE_ERROR GetNewPacketBuffer(TLVWriter& writer, uintptr_t& bufHandle, uint8_t *& bufStart, uint32_t& bufLen);
     static WEAVE_ERROR FinalizePacketBuffer(TLVWriter& writer, uintptr_t bufHandle, uint8_t *bufStart, uint32_t dataLen);
 
+    // Implementations of the GetNewBufferFunct that support writing into a dynamic buffer
+    static WEAVE_ERROR GetNewBuffer_Malloced(TLVWriter& writer, uintptr_t& bufHandle, uint8_t *& bufStart, uint32_t& bufLen);
+
 #if WEAVE_CONFIG_PROVIDE_OBSOLESCENT_INTERFACES
     static WEAVE_ERROR GetNewInetBuffer(TLVWriter& writer, uintptr_t& bufHandle, uint8_t *& bufStart, uint32_t& bufLen);
     static WEAVE_ERROR FinalizeInetBuffer(TLVWriter& writer, uintptr_t bufHandle, uint8_t *bufStart, uint32_t dataLen);
diff --git a/src/lib/core/WeaveTLVWriter.cpp b/src/lib/core/WeaveTLVWriter.cpp
index 75b8990..96ef2f4 100644
--- a/src/lib/core/WeaveTLVWriter.cpp
+++ b/src/lib/core/WeaveTLVWriter.cpp
@@ -32,6 +32,7 @@
 #include <Weave/Core/WeaveEncoding.h>
 #include <Weave/Core/WeaveTLV.h>
 #include <Weave/Support/CodeUtils.h>
+#include <stdlib.h>
 
 namespace nl {
 namespace Weave {
@@ -178,6 +179,30 @@
 }
 
 /**
+ * Initializes a TLVWriter object to write into a dynamic buffer.
+ *
+ * @param[in]   buf     A reference to a pointer that will receive the allocated buffer.
+ * @param[in]   maxLen  The maximum number of bytes that should be written to the output buffer.
+ * @param[in]   initialBufSize
+ *                      The initial number of bytes that should be allocated to the buffer.
+ */
+void TLVWriter::InitMalloced(uint8_t *& outBuf, uint32_t initialBufSize, uint32_t maxLen)
+{
+    mBufHandle = (uintptr_t)&outBuf;
+    mBufStart = mWritePoint = outBuf = (uint8_t *)malloc(initialBufSize);
+    mMaxLen = maxLen;
+    mRemainingLen = initialBufSize;
+    mLenWritten = 0;
+    mContainerType = kTLVType_NotSpecified;
+    SetContainerOpen(false);
+    SetCloseContainerReserved(true);
+
+    ImplicitProfileId = kProfileIdNotSpecified;
+    FinalizeBuffer = NULL;
+    GetNewBuffer = GetNewBuffer_Malloced;
+}
+
+/**
  * Initializes a TLVWriter object to write into a single PacketBuffer.
  *
  * Writing begins immediately after the last byte of existing data in the supplied buffer.
@@ -663,6 +688,77 @@
 }
 
 /**
+ * Encodes a TLV byte string in multiple chunks. This should be used with ContinuePutBytes.
+ *
+ * @param[in]   tag             The TLV tag to be encoded with the value, or @p AnonymousTag if the
+ *                              value should be encoded without a tag.  Tag values should be
+ *                              constructed with one of the tag definition functions ProfileTag(),
+ *                              ContextTag() or CommonTag().
+ * @param[in]   totalLen        The total number of bytes to be encoded.
+ *
+ * @retval #WEAVE_NO_ERROR      If the method succeeded.
+ * @retval #WEAVE_ERROR_TLV_CONTAINER_OPEN
+ *                              If a container writer has been opened on the current writer and not
+ *                              yet closed.
+ * @retval #WEAVE_ERROR_INVALID_TLV_TAG
+ *                              If the specified tag value is invalid or inappropriate in the context
+ *                              in which the value is being written.
+ * @retval #WEAVE_ERROR_BUFFER_TOO_SMALL
+ *                              If writing the value would exceed the limit on the maximum number of
+ *                              bytes specified when the writer was initialized.
+ * @retval #WEAVE_ERROR_NO_MEMORY
+ *                              If an attempt to allocate an output buffer failed due to lack of
+ *                              memory.
+ * @retval other                Other Weave or platform-specific errors returned by the configured
+ *                              GetNewBuffer() or FinalizeBuffer() functions.
+ *
+ */
+WEAVE_ERROR TLVWriter::StartPutBytes(uint64_t tag, uint32_t totalLen)
+{
+    TLVFieldSize lenFieldSize;
+    TLVType type = kTLVType_ByteString;
+
+    if (totalLen <= UINT8_MAX)
+        lenFieldSize = kTLVFieldSize_1Byte;
+    else if (totalLen <= UINT16_MAX)
+        lenFieldSize = kTLVFieldSize_2Byte;
+    else
+        lenFieldSize = kTLVFieldSize_4Byte;
+
+    WEAVE_ERROR err = WriteElementHead((TLVElementType) (type | lenFieldSize), tag, totalLen);
+
+    return err;
+}
+
+/**
+ * Encodes a TLV byte string value. This should be used with StartPutBytes.
+ *
+ * @param[in]   buf             A pointer to a buffer containing the bytes string to be encoded.
+ * @param[in]   len             The number of bytes to be encoded.
+ *
+ * @retval #WEAVE_NO_ERROR      If the method succeeded.
+ * @retval #WEAVE_ERROR_TLV_CONTAINER_OPEN
+ *                              If a container writer has been opened on the current writer and not
+ *                              yet closed.
+ * @retval #WEAVE_ERROR_INVALID_TLV_TAG
+ *                              If the specified tag value is invalid or inappropriate in the context
+ *                              in which the value is being written.
+ * @retval #WEAVE_ERROR_BUFFER_TOO_SMALL
+ *                              If writing the value would exceed the limit on the maximum number of
+ *                              bytes specified when the writer was initialized.
+ * @retval #WEAVE_ERROR_NO_MEMORY
+ *                              If an attempt to allocate an output buffer failed due to lack of
+ *                              memory.
+ * @retval other                Other Weave or platform-specific errors returned by the configured
+ *                              GetNewBuffer() or FinalizeBuffer() functions.
+ *
+ */
+WEAVE_ERROR TLVWriter::ContinuePutBytes(const uint8_t *buf, uint32_t len)
+{
+    return WriteData(buf, len);
+}
+
+/**
  * Encodes a TLV UTF8 string value.
  *
  * @param[in]   tag             The TLV tag to be encoded with the value, or @p AnonymousTag if the
@@ -1877,6 +1973,32 @@
 }
 
 /**
+ * An implementation of a TLVWriter GetNewBuffer function for writing to a dynamic buffer.
+ *
+ * The GetNewBuffer_Malloced() function supplies new output space to a TLVWriter by doubling
+ * the size of the underlying dynamic buffer as needed to store the encoding.  The function
+ * is designed to be assigned to the TLVWriter GetNewBuffer function pointer.
+ *
+ * See the GetNewBufferFunct type definition for additional information on the API of the
+ * GetNewBuffer_Malloced() function.
+ */
+WEAVE_ERROR TLVWriter::GetNewBuffer_Malloced(TLVWriter& writer, uintptr_t& bufHandle, uint8_t *& bufStart, uint32_t& remainingLen)
+{
+    size_t prevSize = (writer.mWritePoint - *(uint8_t **)bufHandle) + writer.mRemainingLen;
+
+    size_t newSize = prevSize * 2;
+    if (newSize > writer.mMaxLen)
+    {
+        newSize = writer.mMaxLen;
+    }
+    *(uint8_t **)bufHandle = (uint8_t *)realloc(*(uint8_t **)bufHandle, newSize);
+    bufStart = *(uint8_t **)bufHandle + prevSize;
+    remainingLen = newSize - prevSize;
+
+    return WEAVE_NO_ERROR;
+}
+
+/**
  * An implementation of a TLVWriter FinalizeBuffer function for writing to a chain of PacketBuffers.
  *
  * The FinalizePacketBuffer() function performs the necessary finalization required when using a
diff --git a/src/lib/profiles/data-management/Current/EventLoggingTags.h b/src/lib/profiles/data-management/Current/EventLoggingTags.h
index 80a8bde..42e2e00 100644
--- a/src/lib/profiles/data-management/Current/EventLoggingTags.h
+++ b/src/lib/profiles/data-management/Current/EventLoggingTags.h
@@ -195,6 +195,30 @@
     kTag_Args  = 2  ///< An array of arguments to be sent along with the token message.
 };
 
+/**
+ * @brief
+ *  Tags for persisting events
+ */
+enum
+{
+    kTagNum_SerializedEventState                    = 1,
+    kTagNum_SerializedEventSet                      = 2,
+    kTag_PersistEvent_ImportanceLevel               = 3,
+    kTag_PersistEvent_EventData                     = 4,
+    kTag_PersistEvent_FirstEventId                  = 5,
+    kTag_PersistEvent_LastEventId                   = 6,
+    kTag_PersistEvent_FirstEventTimestamp           = 7,
+    kTag_PersistEvent_LastEventTimestamp            = 8,
+    kTag_PersistEvent_EventIdCounter                = 9
+
+#if WEAVE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
+    ,
+    kTag_PersistEvent_FirstEventUTCTimestamp        = 10,
+    kTag_PersistEvent_LastEventUTCTimestamp         = 11,
+    kTag_PersistEvent_UTCInitialized                = 12
+#endif
+};
+
 } // namespace WeaveMakeManagedNamespaceIdentifier(DataManagement, kWeaveManagedNamespaceDesignation_Current)
 } // namespace Profiles
 } // namespace Weave
diff --git a/src/lib/profiles/data-management/Current/LoggingManagement.cpp b/src/lib/profiles/data-management/Current/LoggingManagement.cpp
index dd2aebe..d15a18b 100644
--- a/src/lib/profiles/data-management/Current/LoggingManagement.cpp
+++ b/src/lib/profiles/data-management/Current/LoggingManagement.cpp
@@ -27,6 +27,7 @@
 
 #include <Weave/Profiles/data-management/Current/WdmManagedNamespace.h>
 #include <Weave/Profiles/data-management/DataManagement.h>
+#include <Weave/Profiles/WeaveProfiles.h>
 
 #include <Weave/Profiles/bulk-data-transfer/Development/BulkDataTransfer.h>
 #include <Weave/Profiles/bulk-data-transfer/Development/BDXMessages.h>
@@ -437,6 +438,106 @@
 }
 
 /**
+ * Serialize the Weave events of all importance types.
+ *
+ * Serializes the events in WeaveCircularTLVBuffer and the associated states into the
+ * supplied buffer.
+ *
+ * This method is intended to be used by devices that do not retain RAM while sleeping,
+ * allowing them to persist events before going to sleep and thereby prevent lost of
+ * events
+ */
+WEAVE_ERROR LoggingManagement::SerializeEvents(TLVWriter & writer)
+{
+    WEAVE_ERROR err = WEAVE_NO_ERROR;
+
+    Platform::CriticalSectionEnter();
+
+    CircularEventBuffer * eventBuffer = mEventBuffer;
+
+    TLVType container;
+    err = writer.StartContainer(ProfileTag(kWeaveProfile_Common, kTagNum_SerializedEventState), kTLVType_Array, container);
+    SuccessOrExit(err);
+
+    while (eventBuffer != NULL)
+    {
+        err = eventBuffer->SerializeEvents(writer);
+        SuccessOrExit(err);
+
+        eventBuffer = eventBuffer->mNext;
+    }
+
+    err = writer.EndContainer(container);
+    SuccessOrExit(err);
+
+exit:
+    Platform::CriticalSectionExit();
+
+    return err;
+}
+
+/**
+ * @brief Load previously persisted Weave event.
+ *
+ */
+WEAVE_ERROR LoggingManagement::LoadEvents(TLVReader & reader)
+{
+    WEAVE_ERROR err = WEAVE_NO_ERROR;
+
+    Platform::CriticalSectionEnter();
+
+    CircularEventBuffer * eventBuffer = mEventBuffer;
+
+    TLVType container;
+    err = reader.Next(kTLVType_Array, ProfileTag(kWeaveProfile_Common, kTagNum_SerializedEventState));
+    SuccessOrExit(err);
+    err = reader.EnterContainer(container);
+    SuccessOrExit(err);
+
+    while (eventBuffer != NULL)
+    {
+        err = eventBuffer->LoadEvents(reader);
+        SuccessOrExit(err);
+
+        eventBuffer = eventBuffer->mNext;
+    }
+
+    err = reader.VerifyEndOfContainer();
+    SuccessOrExit(err);
+    err = reader.ExitContainer(container);
+    SuccessOrExit(err);
+
+exit:
+    Platform::CriticalSectionExit();
+
+    return err;
+}
+
+/**
+ * @brief Set mShutdownInProgress flag to true.
+ */
+void LoggingManagement::MarkShutdownInProgress(void)
+{
+    mState = kLoggingManagementState_Shutdown;
+}
+
+/**
+ * @brief Set mShutdownInProgress flag to false.
+ */
+void LoggingManagement::CancelShutdownInProgress(void)
+{
+    mState = kLoggingManagementState_Idle;
+}
+
+/**
+ * @brief Check mShutdownInProgress flag.
+ */
+bool LoggingManagement::IsShutdownInProgress(void)
+{
+    return mState == kLoggingManagementState_Shutdown;
+}
+
+/**
  * @brief Set the WeaveExchangeManager to be used with this logging subsystem.  On some
  *   platforms, this may need to happen separately from CreateLoggingManagement() above.
  *
@@ -1676,6 +1777,8 @@
 
         eventBuffer->RemoveEvent(numEventsToDrop);
         eventBuffer->mFirstEventTimestamp += context.mDeltaTime;
+        WeaveLogProgress(EventLogging, "Dropped events do to overflow: { importance_level: %d, count: %d };", imp, numEventsToDrop);
+
 #if WEAVE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
         eventBuffer->mFirstEventUTCTimestamp += context.mDeltaUtc;
 #endif // WEAVE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
@@ -2146,6 +2249,161 @@
     }
 }
 
+WEAVE_ERROR CircularEventBuffer::SerializeEvents(TLVWriter & writer)
+{
+    WEAVE_ERROR err = WEAVE_NO_ERROR;
+
+    TLVType container;
+
+    uint8_t *inBufStart = mBuffer.QueueHead();
+    size_t inBufLen = mBuffer.DataLength();
+    uint8_t *bufStart = mBuffer.GetQueue();
+    size_t bufLen = mBuffer.GetQueueSize();
+
+    size_t initLen = inBufLen;
+    if (initLen > bufStart + bufLen - inBufStart)
+    {
+        initLen = bufStart + bufLen - inBufStart;
+    }
+
+    err = writer.StartContainer(AnonymousTag, kTLVType_Structure, container);
+    SuccessOrExit(err);
+
+    err = writer.Put(ContextTag(kTag_PersistEvent_ImportanceLevel), (uint8_t)mImportance);
+    SuccessOrExit(err);
+
+    err = writer.StartPutBytes(ContextTag(kTag_PersistEvent_EventData), inBufLen);
+    SuccessOrExit(err);
+
+    err = writer.ContinuePutBytes(inBufStart, initLen);
+    SuccessOrExit(err);
+
+    if (inBufLen > initLen)
+    {
+        err = writer.ContinuePutBytes(bufStart, inBufLen - initLen);
+        SuccessOrExit(err);
+    }
+
+    err = writer.Put(ContextTag(kTag_PersistEvent_FirstEventId), mFirstEventID);
+    SuccessOrExit(err);
+
+    err = writer.Put(ContextTag(kTag_PersistEvent_LastEventId), mLastEventID);
+    SuccessOrExit(err);
+
+    err = writer.Put(ContextTag(kTag_PersistEvent_FirstEventTimestamp), mFirstEventTimestamp);
+    SuccessOrExit(err);
+
+    err = writer.Put(ContextTag(kTag_PersistEvent_LastEventTimestamp), mLastEventTimestamp);
+    SuccessOrExit(err);
+
+    err = writer.Put(ContextTag(kTag_PersistEvent_EventIdCounter), mEventIdCounter->GetValue());
+    SuccessOrExit(err);
+
+#if WEAVE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
+    err = writer.Put(ContextTag(kTag_PersistEvent_FirstEventUTCTimestamp), mFirstEventUTCTimestamp);
+    SuccessOrExit(err);
+
+    err = writer.Put(ContextTag(kTag_PersistEvent_LastEventUTCTimestamp), mLastEventUTCTimestamp);
+    SuccessOrExit(err);
+
+    err = writer.PutBoolean(ContextTag(kTag_PersistEvent_UTCInitialized), mUTCInitialized);
+    SuccessOrExit(err);
+#endif
+
+    err = writer.EndContainer(container);
+    SuccessOrExit(err);
+
+exit:
+    if (err != WEAVE_NO_ERROR)
+    {
+        WeaveLogError(EventLogging, "Serialize event error: %d", err);
+    }
+    return err;
+}
+
+WEAVE_ERROR CircularEventBuffer::LoadEvents(TLVReader & reader)
+{
+    WEAVE_ERROR err = WEAVE_NO_ERROR;
+
+    TLVType container;
+
+    uint32_t counterValue;
+    uint8_t importance;
+
+    err = reader.Next(kTLVType_Structure, AnonymousTag);
+    SuccessOrExit(err);
+    err = reader.EnterContainer(container);
+    SuccessOrExit(err);
+
+    err = reader.Next(kTLVType_UnsignedInteger, ContextTag(kTag_PersistEvent_ImportanceLevel));
+    SuccessOrExit(err);
+    err = reader.Get(importance);
+    SuccessOrExit(err);
+    mImportance = (ImportanceType)importance;
+
+    err = reader.Next(kTLVType_ByteString, ContextTag(kTag_PersistEvent_EventData));
+    SuccessOrExit(err);
+    VerifyOrExit(reader.GetLength() <= mBuffer.GetQueueSize(), err = WEAVE_ERROR_BUFFER_TOO_SMALL);
+    mBuffer.SetQueueLength(reader.GetLength());
+    mBuffer.SetQueueHead(mBuffer.GetQueue());
+    err = reader.GetBytes(mBuffer.GetQueue(), mBuffer.DataLength());
+    SuccessOrExit(err);
+
+    err = reader.Next(kTLVType_UnsignedInteger, ContextTag(kTag_PersistEvent_FirstEventId));
+    SuccessOrExit(err);
+    err = reader.Get(mFirstEventID);
+    SuccessOrExit(err);
+
+    err = reader.Next(kTLVType_UnsignedInteger, ContextTag(kTag_PersistEvent_LastEventId));
+    SuccessOrExit(err);
+    err = reader.Get(mLastEventID);
+    SuccessOrExit(err);
+
+    err = reader.Next(kTLVType_UnsignedInteger, ContextTag(kTag_PersistEvent_FirstEventTimestamp));
+    SuccessOrExit(err);
+    err = reader.Get(mFirstEventTimestamp);
+    SuccessOrExit(err);
+
+    err = reader.Next(kTLVType_UnsignedInteger, ContextTag(kTag_PersistEvent_LastEventTimestamp));
+    SuccessOrExit(err);
+    err = reader.Get(mLastEventTimestamp);
+    SuccessOrExit(err);
+
+    err = reader.Next(kTLVType_UnsignedInteger, ContextTag(kTag_PersistEvent_EventIdCounter));
+    SuccessOrExit(err);
+    err = reader.Get(counterValue);
+    SuccessOrExit(err);
+
+    static_cast<PersistedCounter *>(mEventIdCounter)->SetValue(counterValue);
+
+#if WEAVE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
+    err = reader.Next(kTLVType_UnsignedInteger, ContextTag(kTag_PersistEvent_FirstEventUTCTimestamp));
+    SuccessOrExit(err);
+    err = reader.Get(mFirstEventUTCTimestamp);
+    SuccessOrExit(err);
+
+    err = reader.Next(kTLVType_UnsignedInteger, ContextTag(kTag_PersistEvent_LastEventUTCTimestamp));
+    SuccessOrExit(err);
+    err = reader.Get(mLastEventUTCTimestamp);
+    SuccessOrExit(err);
+
+    err = reader.Next(kTLVType_Boolean, ContextTag(kTag_PersistEvent_UTCInitialized));
+    SuccessOrExit(err);
+    err = reader.Get(mUTCInitialized);
+    SuccessOrExit(err);
+#endif
+
+    err = reader.ExitContainer(container);
+    SuccessOrExit(err);
+
+exit:
+    if (err != WEAVE_NO_ERROR)
+    {
+        WeaveLogError(EventLogging, "Load event error: %d", err);
+    }
+    return err;
+}
+
 WEAVE_ERROR CircularEventBuffer::GetNextBufferFunct(TLVReader & ioReader, uintptr_t & inBufHandle, const uint8_t *& outBufStart,
                                                     uint32_t & outBufLen)
 {
diff --git a/src/lib/profiles/data-management/Current/LoggingManagement.h b/src/lib/profiles/data-management/Current/LoggingManagement.h
index 4bf4e0f..5798dd7 100644
--- a/src/lib/profiles/data-management/Current/LoggingManagement.h
+++ b/src/lib/profiles/data-management/Current/LoggingManagement.h
@@ -58,6 +58,12 @@
     // for doxygen, see the CPP file
     void AddEvent(timestamp_t inEventTimestamp);
 
+    // Serializes the events in WeaveCircularTLVBuffer and the associated states
+    WEAVE_ERROR SerializeEvents(TLVWriter & writer);
+
+    // Load from serialized events
+    WEAVE_ERROR LoadEvents(TLVReader & reader);
+
 #if WEAVE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
     // for doxygen, see the CPP file
     void AddEventUTC(utc_timestamp_t inEventTimestamp);
@@ -192,6 +198,16 @@
 
     static void DestroyLoggingManagement(void);
 
+    WEAVE_ERROR LoadEvents(TLVReader & reader);
+
+    WEAVE_ERROR SerializeEvents(TLVWriter & writer);
+
+    void MarkShutdownInProgress(void);
+
+    void CancelShutdownInProgress(void);
+
+    bool IsShutdownInProgress(void);
+
     WEAVE_ERROR SetExchangeManager(nl::Weave::WeaveExchangeManager * inMgr);
 
     event_id_t LogEvent(const EventSchema & inSchema, EventWriterFunct inEventWriter, void * inAppData,
diff --git a/src/lib/profiles/data-management/Current/MessageDef.cpp b/src/lib/profiles/data-management/Current/MessageDef.cpp
index 7a94b48..e07bddf 100644
--- a/src/lib/profiles/data-management/Current/MessageDef.cpp
+++ b/src/lib/profiles/data-management/Current/MessageDef.cpp
@@ -2822,7 +2822,17 @@
 
 WEAVE_ERROR VersionList::Parser::GetVersion(uint64_t * const apVersion)
 {
-    return mReader.Get(*apVersion);
+    WEAVE_ERROR err = WEAVE_NO_ERROR;
+    if (mReader.GetType() == kTLVType_Null)
+    {
+        *apVersion = 0;
+        WeaveLogDetail(DataManagement, "Version is null in GetVersion");
+    }
+    else
+    {
+        err = mReader.Get(*apVersion);
+    }
+    return err;
 }
 
 VersionList::Builder & VersionList::Builder::AddVersion(const uint64_t aVersion)
diff --git a/src/lib/profiles/data-management/Current/SubscriptionClient.cpp b/src/lib/profiles/data-management/Current/SubscriptionClient.cpp
index d8da9fd..8163a4b 100644
--- a/src/lib/profiles/data-management/Current/SubscriptionClient.cpp
+++ b/src/lib/profiles/data-management/Current/SubscriptionClient.cpp
@@ -2576,6 +2576,7 @@
         if (IsStatusListPresent)
         {
             err = statusList.Next();
+            SuccessOrExit(err);
 
             err = statusList.GetProfileIDAndStatusCode(&profileID, &statusCode);
             SuccessOrExit(err);
diff --git a/src/lib/profiles/data-management/Current/SubscriptionEngine.cpp b/src/lib/profiles/data-management/Current/SubscriptionEngine.cpp
index 1ea0af6..b37a1c5 100644
--- a/src/lib/profiles/data-management/Current/SubscriptionEngine.cpp
+++ b/src/lib/profiles/data-management/Current/SubscriptionEngine.cpp
@@ -1995,11 +1995,13 @@
     {
         TraitDataHandle handle;
         PropertyPathHandle pathHandle;
-
-        // if it is running conditional loop, needs to skip unconditional elements, vice versa.
-        err = ProcessUpdateRequestDataElement(dataReader, handle, pathHandle, apCatalog, acDelegate, aConditionalLoop, index,
-                                              aExistFailure, apStatusDataHandleList);
-        SuccessOrExit(err);
+        if (!(apStatusDataHandleList[index].mProfileId == nl::Weave::Profiles::kWeaveProfile_Common && apStatusDataHandleList[index].mStatusCode == nl::Weave::Profiles::Common::kStatus_Success))
+        {
+            // if it is running conditional loop, needs to skip unconditional elements, vice versa.
+            err = ProcessUpdateRequestDataElement(dataReader, handle, pathHandle, apCatalog, acDelegate, aConditionalLoop, index,
+                                                  aExistFailure, apStatusDataHandleList);
+            SuccessOrExit(err);
+        }
     }
 
     // if we have exhausted this container
@@ -2028,6 +2030,7 @@
         ProcessUpdateRequestDataListWithConditionality(aReader, apStatusDataHandleList, apCatalog, acDelegate, aExistFailure, true);
     SuccessOrExit(err);
 
+
     // process unconditional DEs
     err = ProcessUpdateRequestDataListWithConditionality(aReader, apStatusDataHandleList, apCatalog, acDelegate, aExistFailure,
                                                          false);
diff --git a/src/lib/profiles/data-management/Current/TraitData.h b/src/lib/profiles/data-management/Current/TraitData.h
index 41454d1..980740c 100644
--- a/src/lib/profiles/data-management/Current/TraitData.h
+++ b/src/lib/profiles/data-management/Current/TraitData.h
@@ -931,6 +931,9 @@
     bool mRootIsDirty;
 #endif
 
+    // Set current version of the data in this source.
+    void SetVersion(uint64_t version) { mVersion = version; }
+
 protected: // IGetDataDelegate
     /*
      * Defaults to calling GetLeafData if aHandle is a leaf. DataSources
@@ -954,9 +957,6 @@
     }
 #endif
 
-    // Set current version of the data in this source.
-    void SetVersion(uint64_t version) { mVersion = version; }
-
     // Increment current version of the data in this source.
     void IncrementVersion(void);
     // Controls whether mVersion is incremented automatically or not.
diff --git a/src/lib/profiles/device-control/DeviceControl.h b/src/lib/profiles/device-control/DeviceControl.h
index bec6c29..e155bd5 100644
--- a/src/lib/profiles/device-control/DeviceControl.h
+++ b/src/lib/profiles/device-control/DeviceControl.h
@@ -110,7 +110,7 @@
     kResetConfigFlag_All                        = 0x00FF, /**< Reset all device configuration information. */
     kResetConfigFlag_NetworkConfig              = 0x0001, /**< Reset network configuration information. */
     kResetConfigFlag_FabricConfig               = 0x0002, /**< Reset fabric configuration information. */
-    kResetConfigFlag_ServiceConfig              = 0x0004, /**< Reset network configuration information. */
+    kResetConfigFlag_ServiceConfig              = 0x0004, /**< Reset service configuration information. */
     kResetConfigFlag_OperationalCredentials     = 0x0008, /**< Reset device operational credentials. */
     kResetConfigFlag_FactoryDefaults            = 0x8000  /**< Reset device to full factory defaults. */
 };
diff --git a/src/lib/support/PersistedCounter.cpp b/src/lib/support/PersistedCounter.cpp
index 9e81167..2e3cd3d 100644
--- a/src/lib/support/PersistedCounter.cpp
+++ b/src/lib/support/PersistedCounter.cpp
@@ -73,6 +73,20 @@
 }
 
 WEAVE_ERROR
+PersistedCounter::SetValue(uint32_t value)
+{
+    WEAVE_ERROR err = WEAVE_NO_ERROR;
+
+    err = WriteStartValue(value + mEpoch);
+    SuccessOrExit(err);
+
+    mCounterValue = mStartingCounterValue = value;
+
+exit:
+    return err;
+}
+
+WEAVE_ERROR
 PersistedCounter::Advance(void)
 {
     return IncrementCount();
diff --git a/src/lib/support/PersistedCounter.h b/src/lib/support/PersistedCounter.h
index 4704512..80e91cc 100644
--- a/src/lib/support/PersistedCounter.h
+++ b/src/lib/support/PersistedCounter.h
@@ -81,6 +81,13 @@
      */
     WEAVE_ERROR AdvanceEpochRelative(uint32_t aValue);
 
+    /**
+     *  @brief
+     *    This is used to set the event counter from persisted events
+     *
+     */
+    WEAVE_ERROR SetValue(uint32_t value);
+
 private:
     /**
      *  @brief
diff --git a/src/lwip/standalone/TapInterface.c b/src/lwip/standalone/TapInterface.c
index 89f7bdc..b6350c3 100644
--- a/src/lwip/standalone/TapInterface.c
+++ b/src/lwip/standalone/TapInterface.c
@@ -197,7 +197,7 @@
     if (buf->tot_len > buf->len)
     {
         // Allocate a buffer from the buffer pool. Fail if none available.
-        outBuf = pbuf_alloc(PBUF_RAW, buf->tot_len + PBUF_LINK_ENCAPSULATION_HLEN, PBUF_POOL);
+        outBuf = pbuf_alloc(PBUF_RAW, buf->tot_len, PBUF_POOL);
         if (outBuf == NULL)
         {
             fprintf(stderr, "TapInterface: Failed to allocate buffer\n");
@@ -213,9 +213,6 @@
             goto done;
         }
 
-        // Reserve the space needed by WICED for its buffer management.
-        pbuf_header(outBuf, -PBUF_LINK_ENCAPSULATION_HLEN);
-
         // Copy output data to the new buffer.
         retval = pbuf_copy(outBuf, buf);
         if (retval != ERR_OK)
@@ -278,7 +275,7 @@
     snmp_add_ifinoctets(netif, len);
 
     /* We allocate a pbuf chain of pbufs from the pool. */
-    p = pbuf_alloc(PBUF_LINK, len, PBUF_POOL);
+    p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
 
     if (p != NULL) {
         /* We iterate over the pbuf chain until we have read the entire
diff --git a/src/lwip/standalone/lwipopts.h b/src/lwip/standalone/lwipopts.h
index 66e46fd..8a9bb6b 100644
--- a/src/lwip/standalone/lwipopts.h
+++ b/src/lwip/standalone/lwipopts.h
@@ -63,18 +63,11 @@
 #define MEM_USE_POOLS                  (0)
 
 /**
- * Do not use custom memory pools for specific, named LwIP objects, sourced
- * from lwippools.h.
- */
-#define MEM_USE_CUSTOM_POOLS           (MEM_USE_POOLS)
-
-/**
  * MEMP_NUM_NETBUF: the number of struct netbufs.
  * (only needed if you use the sequential API, like api_lib.c)
  */
 #define MEMP_NUM_NETBUF                (PBUF_POOL_SIZE)
 
-
 /**
  * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
  * (requires the LWIP_TCP option)
@@ -82,14 +75,112 @@
 #define MEMP_NUM_TCP_SEG               (TCP_SND_QUEUELEN+1)
 
 /**
- * PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
- *
- * This is just a default designed to be overriden by the FreeRTOS.mk makefile
- * To perform this override, define the makefile variable LWIP_NUM_PACKET_BUFFERS_IN_POOL
+ * LWIP_PBUF_FROM_CUSTOM_POOLS: Enable the use of variable-sized pbuf pools.
  */
+#ifndef LWIP_PBUF_FROM_CUSTOM_POOLS
+#define LWIP_PBUF_FROM_CUSTOM_POOLS         (1)
+#endif // LWIP_PBUF_FROM_CUSTOM_POOLS
+
+/**
+ * PBUF_POOL_BUFSIZE: Payload size of default pbuf buffer.
+ *
+ * For the Weave standalone LwIP build, this is sized to accommodate the largest
+ * possible standard Ethernet frame (Ethernet header + 1500 bytes of payload),
+ * plus any additional bytes needed for a link encapsulation header (which is 0
+ * in the default case).
+ */
+#ifndef PBUF_POOL_BUFSIZE
+#define PBUF_POOL_BUFSIZE              (LWIP_MEM_ALIGN_SIZE(PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + ETHERNET_MTU))
+#endif // PBUF_POOL_BUFSIZE
+
+/**
+ * PBUF_POOL_SIZE: Number of buffers in the default pbuf pool.
+ *
+ * When #LWIP_PBUF_FROM_CUSTOM_POOLS is enabled, the default buffer pool is
+ * not used, and hence this value is set to zero.
+ */
+#if LWIP_PBUF_FROM_CUSTOM_POOLS
+#define PBUF_POOL_SIZE                 (0)
+#else // LWIP_PBUF_FROM_CUSTOM_POOLS
 #ifndef PBUF_POOL_SIZE
 #define PBUF_POOL_SIZE                 (10)
-#endif
+#endif // PBUF_POOL_SIZE
+#endif //LWIP_PBUF_FROM_CUSTOM_POOLS
+
+#if LWIP_PBUF_FROM_CUSTOM_POOLS
+
+/**
+ * PBUF_POOL_BUFSIZE_LARGE: Payload size of largest pbuf buffer.
+ *
+ * The specified size must match #PBUF_POOL_BUFSIZE.
+ */
+#define PBUF_POOL_BUFSIZE_LARGE        (PBUF_POOL_BUFSIZE)
+
+/**
+ * PBUF_POOL_BUFSIZE_MEDIUM: Payload size of medium pbuf buffer.
+ */
+#ifndef PBUF_POOL_BUFSIZE_MEDIUM
+#define PBUF_POOL_BUFSIZE_MEDIUM       (600)
+#endif // PBUF_POOL_BUFSIZE_MEDIUM
+
+/**
+ * PBUF_POOL_BUFSIZE_SMALL: Payload size of small pbuf buffer.
+ */
+#ifndef PBUF_POOL_BUFSIZE_SMALL
+#define PBUF_POOL_BUFSIZE_SMALL        (200)
+#endif // PBUF_POOL_BUFSIZE_SMALL
+
+/**
+ * PBUF_POOL_SIZE_LARGE: Number of buffers in the large pbuf pool.
+ */
+#ifndef PBUF_POOL_SIZE_LARGE
+#define PBUF_POOL_SIZE_LARGE           (5)
+#endif // PBUF_POOL_SIZE_LARGE
+
+/**
+ * PBUF_POOL_SIZE_MEDIUM: Number of buffers in the medium pbuf pool.
+ */
+#ifndef PBUF_POOL_SIZE_MEDIUM
+#define PBUF_POOL_SIZE_MEDIUM          (5)
+#endif // PBUF_POOL_SIZE_MEDIUM
+
+/**
+ * PBUF_POOL_SIZE_SMALL: Number of buffers in the small pbuf pool.
+ */
+#ifndef PBUF_POOL_SIZE_SMALL
+#define PBUF_POOL_SIZE_SMALL           (5)
+#endif // PBUF_POOL_SIZE_SMALL
+
+/**
+ * PBUF_CUSTOM_POOL_IDX_START: memp pool number for the pool containing the smallest
+ * pbuf buffer.
+ *
+ * Note this value must be numerically >= #PBUF_CUSTOM_POOL_IDX_END
+ */
+#define PBUF_CUSTOM_POOL_IDX_START     (MEMP_PBUF_POOL_SMALL)
+
+/**
+ * PBUF_CUSTOM_POOL_IDX_END: memp pool number for the pool containing the largest
+ * pbuf buffer.
+ *
+ * Note this value must be numerically <= #PBUF_CUSTOM_POOL_IDX_START
+ */
+#define PBUF_CUSTOM_POOL_IDX_END       (MEMP_PBUF_POOL_LARGE)
+
+#endif // LWIP_PBUF_FROM_CUSTOM_POOLS
+
+/**
+ * MEMP_USE_CUSTOM_POOLS: Enable use of custom memory pools defined in lwippools.h.
+ * Required if LWIP_PBUF_FROM_CUSTOM_POOLS is enabled.
+ */
+#if LWIP_PBUF_FROM_CUSTOM_POOLS
+#undef MEMP_USE_CUSTOM_POOLS
+#define MEMP_USE_CUSTOM_POOLS          (1)
+#else // LWIP_PBUF_FROM_CUSTOM_POOLS
+#ifndef MEMP_USE_CUSTOM_POOLS
+#define MEMP_USE_CUSTOM_POOLS          (0)
+#endif // MEMP_USE_CUSTOM_POOLS
+#endif // LWIP_PBUF_FROM_CUSTOM_POOLS
 
 /*
  * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled.
@@ -119,27 +210,22 @@
 #define MEMP_NUM_REASSDATA              0
 #endif
 
-#define PAYLOAD_MTU                    (1500)
+/**
+ * ETHERNET_MTU: MTU for standard Ethernet.
+ */
+#define ETHERNET_MTU                   (1500)
 
 /**
- * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default,
- * you might want to increase this.)
+ * TCP_MSS: TCP Maximum segment size.
+ *
  * For the receive side, this MSS is advertised to the remote side
  * when opening a connection. For the transmit size, this MSS sets
  * an upper limit on the MSS advertised by the remote host.
+ *
+ * Set to the default value for IPv4, which is the default IPv4 MTU
+ * minus the IP and TCP header sizes (576 - 20 - 20 = 536).
  */
-#define TCP_MSS                        (1152)
-
-/**
- * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
- * designed to accomodate single full size link-layer frame in one pbuf, including
- * the link-layer header and any link-layer encapsulation header, and the pbuf
- * structure itself.
- */
-
-#define PBUF_POOL_BUFSIZE                                                                 \
-    LWIP_MEM_ALIGN_SIZE(PAYLOAD_MTU + PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN)    + \
-    LWIP_MEM_ALIGN_SIZE(sizeof(struct pbuf) + 1)
+#define TCP_MSS                        (536)
 
 /**
  * TCP_SND_BUF: TCP sender buffer space (bytes).
@@ -147,16 +233,6 @@
  */
 #define TCP_SND_BUF                    (6 * TCP_MSS)
 
-/**
- * ETH_PAD_SIZE: the header space required preceeding the of each pbuf in the pbuf pool. The default is
- * designed to accomodate single full size TCP frame in one pbuf, including
- * TCP_MSS, IP header, and link header.
- *
- * This is zero since the role has been taken over by SUB_ETHERNET_HEADER_SPACE as ETH_PAD_SIZE was not always obeyed
- */
-#define ETH_PAD_SIZE                   (0)
-
-
 
 /**
  * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data
@@ -384,45 +460,61 @@
 #endif 
 
 /**
- * Debug printing
- * By default enable debug printing for debug build, but set level to off
- * This allows user to change any desired debug level to on.
+ * MEMP_OVERFLOW_CHECK: memp overflow protection
+ *
+ * IMPORTANT: A bug in older versions of LwIP will trigger unit test failures whenever
+ * #MEMP_OVERFLOW_CHECK is enabled.  This bug was fixed in upstream LwIP in commit 2fd2b68,
+ * but remains in the openweave third_party version.
  */
+#define MEMP_OVERFLOW_CHECK            ( 0 )
+
+
+/*
+ * LwIP Logging
+ *
+ * By default, enable LwIP debug logging for debug builds, using a global
+ * flag (gLwIP_DebugFlags) to control the level.  This allows the user to
+ * control LwIP logging output from the command line.
+ */
+
+#ifdef DEBUG
+#define LWIP_DEBUG
+#endif
+
 #ifdef LWIP_DEBUG
 
-#define MEMP_OVERFLOW_CHECK            ( 1 )
 #define MEMP_SANITY_CHECK              ( 1 )
 
-#define MEM_DEBUG        LWIP_DBG_OFF
-#define MEMP_DEBUG       LWIP_DBG_OFF
-#define PBUF_DEBUG       LWIP_DBG_ON
-#define API_LIB_DEBUG    LWIP_DBG_ON
-#define API_MSG_DEBUG    LWIP_DBG_ON
-#define TCPIP_DEBUG      LWIP_DBG_ON
-#define NETIF_DEBUG      LWIP_DBG_ON
-#define SOCKETS_DEBUG    LWIP_DBG_ON
-#define DEMO_DEBUG       LWIP_DBG_ON
-#define IP_DEBUG         LWIP_DBG_ON
-#define IP6_DEBUG        LWIP_DBG_ON
-#define IP_REASS_DEBUG   LWIP_DBG_ON
-#define RAW_DEBUG        LWIP_DBG_ON
-#define ICMP_DEBUG       LWIP_DBG_ON
-#define UDP_DEBUG        LWIP_DBG_ON
-#define TCP_DEBUG        LWIP_DBG_ON
-#define TCP_INPUT_DEBUG  LWIP_DBG_ON
-#define TCP_OUTPUT_DEBUG LWIP_DBG_ON
-#define TCP_RTO_DEBUG    LWIP_DBG_ON
-#define TCP_CWND_DEBUG   LWIP_DBG_ON
-#define TCP_WND_DEBUG    LWIP_DBG_ON
-#define TCP_FR_DEBUG     LWIP_DBG_ON
-#define TCP_QLEN_DEBUG   LWIP_DBG_ON
-#define TCP_RST_DEBUG    LWIP_DBG_ON
-#define PPP_DEBUG        LWIP_DBG_OFF
+#define MEM_DEBUG                       LWIP_DBG_OFF
+#define MEMP_DEBUG                      LWIP_DBG_OFF
+#define PBUF_DEBUG                      LWIP_DBG_ON
+#define API_LIB_DEBUG                   LWIP_DBG_ON
+#define API_MSG_DEBUG                   LWIP_DBG_ON
+#define TCPIP_DEBUG                     LWIP_DBG_ON
+#define NETIF_DEBUG                     LWIP_DBG_ON
+#define SOCKETS_DEBUG                   LWIP_DBG_ON
+#define DEMO_DEBUG                      LWIP_DBG_ON
+#define IP_DEBUG                        LWIP_DBG_ON
+#define IP6_DEBUG                       LWIP_DBG_ON
+#define IP_REASS_DEBUG                  LWIP_DBG_ON
+#define RAW_DEBUG                       LWIP_DBG_ON
+#define ICMP_DEBUG                      LWIP_DBG_ON
+#define UDP_DEBUG                       LWIP_DBG_ON
+#define TCP_DEBUG                       LWIP_DBG_ON
+#define TCP_INPUT_DEBUG                 LWIP_DBG_ON
+#define TCP_OUTPUT_DEBUG                LWIP_DBG_ON
+#define TCP_RTO_DEBUG                   LWIP_DBG_ON
+#define TCP_CWND_DEBUG                  LWIP_DBG_ON
+#define TCP_WND_DEBUG                   LWIP_DBG_ON
+#define TCP_FR_DEBUG                    LWIP_DBG_ON
+#define TCP_QLEN_DEBUG                  LWIP_DBG_ON
+#define TCP_RST_DEBUG                   LWIP_DBG_ON
+#define PPP_DEBUG                       LWIP_DBG_OFF
 
 extern unsigned char gLwIP_DebugFlags;
 #define LWIP_DBG_TYPES_ON gLwIP_DebugFlags
 
-#endif
+#endif // LWIP_DEBUG
 
 /**
  * The WICED definition of PBUF_POOL_BUFSIZE includes a number of
diff --git a/src/lwip/standalone/lwippools.h b/src/lwip/standalone/lwippools.h
new file mode 100644
index 0000000..08a02c1
--- /dev/null
+++ b/src/lwip/standalone/lwippools.h
@@ -0,0 +1,35 @@
+/*
+ *
+ *    Copyright (c) 2019 Google LLC.
+ *    Copyright (c) 2014-2018 Nest Labs, Inc.
+ *    All rights reserved.
+ *
+ *    Licensed under the Apache License, Version 2.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+/**
+ *    @file
+ *      Defines variable sized pbuf pools for standalone LwIP builds.
+ *
+ */
+
+
+#if LWIP_PBUF_FROM_CUSTOM_POOLS
+
+// Variable-sized pbuf pools for use when LWIP_PBUF_FROM_CUSTOM_POOLS is enabled.
+// Pools must be arranged in decreasing order of size.
+LWIP_PBUF_MEMPOOL(PBUF_POOL_LARGE,  PBUF_POOL_SIZE_LARGE,  PBUF_POOL_BUFSIZE_LARGE,  "PBUF_POOL_LARGE")
+LWIP_PBUF_MEMPOOL(PBUF_POOL_MEDIUM, PBUF_POOL_SIZE_MEDIUM, PBUF_POOL_BUFSIZE_MEDIUM, "PBUF_POOL_MEDIUM")
+LWIP_PBUF_MEMPOOL(PBUF_POOL_SMALL,  PBUF_POOL_SIZE_SMALL,  PBUF_POOL_BUFSIZE_SMALL,  "PBUF_POOL_SMALL")
+
+#endif // LWIP_PBUF_FROM_CUSTOM_POOLS
diff --git a/src/lwip/standalone/sys_arch.c b/src/lwip/standalone/sys_arch.c
index 8085ec1..50379eb 100644
--- a/src/lwip/standalone/sys_arch.c
+++ b/src/lwip/standalone/sys_arch.c
@@ -662,9 +662,8 @@
 }
 #endif
 
-#if LWIP_DEBUG
+#ifdef LWIP_DEBUG
 
 unsigned char gLwIP_DebugFlags = 0;
 
-
 #endif
diff --git a/src/system/SystemPacketBuffer.cpp b/src/system/SystemPacketBuffer.cpp
index ad6bae2..c50d49b 100644
--- a/src/system/SystemPacketBuffer.cpp
+++ b/src/system/SystemPacketBuffer.cpp
@@ -439,7 +439,6 @@
 {
     const size_t lReservedSize = static_cast<size_t>(aReservedSize);
     const size_t lAllocSize = lReservedSize + aAvailableSize;
-    const size_t lBlockSize = WEAVE_SYSTEM_PACKETBUFFER_HEADER_SIZE + lAllocSize;
     PacketBuffer* lPacket;
 
     WEAVE_SYSTEM_FAULT_INJECT(FaultInjection::kFault_PacketBufferNew, return NULL);
@@ -452,15 +451,13 @@
 
 #if WEAVE_SYSTEM_CONFIG_USE_LWIP
 
-    lPacket = static_cast<PacketBuffer*>(pbuf_alloc(PBUF_RAW, lBlockSize, PBUF_POOL));
+    lPacket = static_cast<PacketBuffer*>(pbuf_alloc(PBUF_RAW, lAllocSize, PBUF_POOL));
 
     SYSTEM_STATS_UPDATE_LWIP_PBUF_COUNTS();
 
 #else // !WEAVE_SYSTEM_CONFIG_USE_LWIP
 #if WEAVE_SYSTEM_CONFIG_PACKETBUFFER_MAXALLOC
 
-    static_cast<void>(lBlockSize);
-
     LOCK_BUF_POOL();
 
     lPacket = sFreeList;
@@ -474,6 +471,8 @@
 
 #else // !WEAVE_SYSTEM_CONFIG_PACKETBUFFER_MAXALLOC
 
+    const size_t lBlockSize = WEAVE_SYSTEM_PACKETBUFFER_HEADER_SIZE + lAllocSize;
+
     lPacket = reinterpret_cast<PacketBuffer*>(malloc(lBlockSize));
     SYSTEM_STATS_INCREMENT(nl::Weave::System::Stats::kSystemLayer_NumPacketBufs);
 
diff --git a/src/system/SystemPacketBuffer.h b/src/system/SystemPacketBuffer.h
index 1114d42..a91786b 100644
--- a/src/system/SystemPacketBuffer.h
+++ b/src/system/SystemPacketBuffer.h
@@ -174,7 +174,7 @@
  *
  */
 #if WEAVE_SYSTEM_CONFIG_USE_LWIP
-#define WEAVE_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX (LWIP_MEM_ALIGN_SIZE(PBUF_POOL_BUFSIZE) - WEAVE_SYSTEM_PACKETBUFFER_HEADER_SIZE)
+#define WEAVE_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX (PBUF_POOL_BUFSIZE)
 #endif // WEAVE_SYSTEM_CONFIG_USE_LWIP
 
 /**
diff --git a/src/test-apps/TestRetainedPacketBuffer.cpp b/src/test-apps/TestRetainedPacketBuffer.cpp
index 62eb956..c67c149 100644
--- a/src/test-apps/TestRetainedPacketBuffer.cpp
+++ b/src/test-apps/TestRetainedPacketBuffer.cpp
@@ -50,6 +50,23 @@
     }
 }
 
+#if WEAVE_SYSTEM_CONFIG_USE_LWIP && LWIP_PBUF_FROM_CUSTOM_POOLS
+
+#define NL_TEST_ASSERT_NO_BUFFERS_IN_USE(suite) \
+do { \
+    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPBUF_POOL_LARGE] == 0); \
+    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPBUF_POOL_MEDIUM] == 0); \
+    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPBUF_POOL_SMALL] == 0); \
+} while (0)
+
+#else // WEAVE_SYSTEM_CONFIG_USE_LWIP && LWIP_PBUF_FROM_CUSTOM_POOLS
+
+#define NL_TEST_ASSERT_NO_BUFFERS_IN_USE(suite) \
+    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0)
+
+#endif // WEAVE_SYSTEM_CONFIG_USE_LWIP && LWIP_PBUF_FROM_CUSTOM_POOLS
+
+
 /**
  *  Test default construction and, implictly, destruction
  *
@@ -258,7 +275,7 @@
 
     // Assert that the buffer has been released to the pool, as expected.
 
-    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0);
+    NL_TEST_ASSERT_NO_BUFFERS_IN_USE(inSuite);
 }
 
 /**
@@ -313,7 +330,7 @@
 
     // Assert that the buffer has been released to the pool, as expected.
 
-    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0);
+    NL_TEST_ASSERT_NO_BUFFERS_IN_USE(inSuite);
 }
 
 /**
@@ -404,7 +421,7 @@
 
     // Assert that the buffer has been released to the pool, as expected.
 
-    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0);
+    NL_TEST_ASSERT_NO_BUFFERS_IN_USE(inSuite);
 }
 
 /**
@@ -497,7 +514,7 @@
 
     // Assert that the buffer has been released to the pool, as expected.
 
-    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0);
+    NL_TEST_ASSERT_NO_BUFFERS_IN_USE(inSuite);
 }
 
 /**
@@ -604,7 +621,7 @@
 
     // Assert that the buffer has been released to the pool, as expected.
 
-    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0);
+    NL_TEST_ASSERT_NO_BUFFERS_IN_USE(inSuite);
 }
 
 /**
@@ -710,7 +727,7 @@
 
     // Assert that the buffer has been released to the pool, as expected.
 
-    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0);
+    NL_TEST_ASSERT_NO_BUFFERS_IN_USE(inSuite);
 }
 
 /**
@@ -803,7 +820,7 @@
 
     // Assert that the buffer has been released to the pool, as expected.
 
-    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0);
+    NL_TEST_ASSERT_NO_BUFFERS_IN_USE(inSuite);
 }
 
 /**
@@ -898,7 +915,7 @@
 
     // Assert that the buffer has been released to the pool, as expected.
 
-    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0);
+    NL_TEST_ASSERT_NO_BUFFERS_IN_USE(inSuite);
 }
 
 /**
@@ -1007,7 +1024,7 @@
 
     // Assert that the buffer has been released to the pool, as expected.
 
-    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0);
+    NL_TEST_ASSERT_NO_BUFFERS_IN_USE(inSuite);
 }
 
 /**
@@ -1115,7 +1132,7 @@
 
     // Assert that the buffer has been released to the pool, as expected.
 
-    NL_TEST_ASSERT(inSuite, System::Stats::GetResourcesInUse()[System::Stats::kSystemLayer_NumPacketBufs] == 0);
+    NL_TEST_ASSERT_NO_BUFFERS_IN_USE(inSuite);
 }
 
 static const nlTest sTests[] = {
diff --git a/src/test-apps/happy/bin/set_test_path.py b/src/test-apps/happy/bin/set_test_path.py
index 52d9b3d..ce6ea8a 100755
--- a/src/test-apps/happy/bin/set_test_path.py
+++ b/src/test-apps/happy/bin/set_test_path.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -18,6 +18,7 @@
 #
 
 
+from __future__ import absolute_import
 import os
 import sys
 
diff --git a/src/test-apps/happy/bin/weave-bdx.py b/src/test-apps/happy/bin/weave-bdx.py
index 26f99fc..d88cc6f 100755
--- a/src/test-apps/happy/bin/weave-bdx.py
+++ b/src/test-apps/happy/bin/weave-bdx.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveBDX class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -41,13 +43,13 @@
                         "download=", "offset=", "length=", "tap=", "server-version=", "client-version="])
 
 	except getopt.GetoptError as err:
-		print WeaveBDX.WeaveBDX.__doc__
-		print hred(str(err))
+		print(WeaveBDX.WeaveBDX.__doc__)
+		print(hred(str(err)))
                 sys.exit(hred("%s: Failed destination parse arguments." % (__file__)))
 
 	for o, a in opts:
 		if o in ("-h", "--help"):
-			print WeaveBDX.WeaveBDX.__doc__
+			print(WeaveBDX.WeaveBDX.__doc__)
 			sys.exit(0)
 
 		elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-connection-tunnel.py b/src/test-apps/happy/bin/weave-connection-tunnel.py
index ad28b82..e8d74b3 100755
--- a/src/test-apps/happy/bin/weave-connection-tunnel.py
+++ b/src/test-apps/happy/bin/weave-connection-tunnel.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveConnectionTunnel class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -40,13 +42,13 @@
             ["help", "agent=", "source=", "destination=", "quiet", "tap="])
 
     except getopt.GetoptError as err:
-        print WeaveConnectionTunnel.WeaveConnectionTunnel.__doc__
-        print hred(str(err))
+        print(WeaveConnectionTunnel.WeaveConnectionTunnel.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveConnectionTunnel.WeaveConnectionTunnel.__doc__
+            print(WeaveConnectionTunnel.WeaveConnectionTunnel.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-device-description.py b/src/test-apps/happy/bin/weave-device-description.py
index e5f2b20..f24ffa2 100755
--- a/src/test-apps/happy/bin/weave-device-description.py
+++ b/src/test-apps/happy/bin/weave-device-description.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveDeviceDescription class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -41,13 +43,13 @@
             ["help", "quiet", "server=", "client=", "tap="])
 
     except getopt.GetoptError as err:
-        print WeaveDeviceDescription.WeaveDeviceDescription.__doc__
-        print hred(str(err))
+        print(WeaveDeviceDescription.WeaveDeviceDescription.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed destination parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveDeviceDescription.WeaveDeviceDescription.__doc__
+            print(WeaveDeviceDescription.WeaveDeviceDescription.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-fabric-add.py b/src/test-apps/happy/bin/weave-fabric-add.py
index 876ea2e..525c0d5 100755
--- a/src/test-apps/happy/bin/weave-fabric-add.py
+++ b/src/test-apps/happy/bin/weave-fabric-add.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2015-2017 Nest Labs, Inc.
@@ -24,6 +24,8 @@
 #       The command is executed by instantiating and running WeaveFabricAdd class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -39,13 +41,13 @@
                                    ["help", "id=", "quiet"])
 
     except getopt.GetoptError as err:
-        print WeaveFabricAdd.WeaveFabricAdd.__doc__
-        print hred(str(err))
+        print(WeaveFabricAdd.WeaveFabricAdd.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveFabricAdd.WeaveFabricAdd.__doc__
+            print(WeaveFabricAdd.WeaveFabricAdd.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-fabric-delete.py b/src/test-apps/happy/bin/weave-fabric-delete.py
index 076100f..3f38c4c 100755
--- a/src/test-apps/happy/bin/weave-fabric-delete.py
+++ b/src/test-apps/happy/bin/weave-fabric-delete.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2015-2017 Nest Labs, Inc.
@@ -24,6 +24,8 @@
 #       The command is executed by instantiating and running WeaveFabricDelete class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -39,13 +41,13 @@
                                    ["help", "id=", "quiet"])
 
     except getopt.GetoptError as err:
-        print WeaveFabricDelete.WeaveFabricDelete.__doc__
-        print hred(str(err))
+        print(WeaveFabricDelete.WeaveFabricDelete.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveFabricDelete.WeaveFabricDelete.__doc__
+            print(WeaveFabricDelete.WeaveFabricDelete.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-heartbeat.py b/src/test-apps/happy/bin/weave-heartbeat.py
index 3f34635..0831030 100755
--- a/src/test-apps/happy/bin/weave-heartbeat.py
+++ b/src/test-apps/happy/bin/weave-heartbeat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveHeartbeat class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -40,13 +42,13 @@
 			["help", "origin=", "server=", 
 				"count=", "quiet", "tap="])
 	except getopt.GetoptError as err:
-		print WeaveHeartbeat.WeaveHeartbeat.__doc__
-		print hred(str(err))
+		print(WeaveHeartbeat.WeaveHeartbeat.__doc__)
+		print(hred(str(err)))
                 sys.exit(hred("%s: Failed server parse arguments." % (__file__)))
 
 	for o, a in opts:
 		if o in ("-h", "--help"):
-			print WeaveHeartbeat.WeaveHeartbeat.__doc__
+			print(WeaveHeartbeat.WeaveHeartbeat.__doc__)
 			sys.exit(0)
 
 		elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-key-export.py b/src/test-apps/happy/bin/weave-key-export.py
index 97531f5..f819e5e 100755
--- a/src/test-apps/happy/bin/weave-key-export.py
+++ b/src/test-apps/happy/bin/weave-key-export.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -24,6 +24,8 @@
 #       The command is executed by instantiating and running WeaveKeyExport class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -40,13 +42,13 @@
                          "key-id=", "dont-sign-msgs", "quiet", "tap=",
                          "server_faults=", "client_faults="])
         except getopt.GetoptError as err:
-                print WeaveKeyExport.WeaveKeyExport.__doc__
-                print hred(str(err))
+                print(WeaveKeyExport.WeaveKeyExport.__doc__)
+                print(hred(str(err)))
                 sys.exit(hred("%s: Failed server parse arguments." % (__file__)))
 
         for o, a in opts:
                 if o in ("-h", "--help"):
-                        print WeaveKeyExport.WeaveKeyExport.__doc__
+                        print(WeaveKeyExport.WeaveKeyExport.__doc__)
                         sys.exit(0)
 
                 elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-messagelayer.py b/src/test-apps/happy/bin/weave-messagelayer.py
index 13abdcd..d10ce43 100755
--- a/src/test-apps/happy/bin/weave-messagelayer.py
+++ b/src/test-apps/happy/bin/weave-messagelayer.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveMessageLayer class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -39,13 +41,13 @@
 		opts, args = getopt.getopt(sys.argv[1:], "hc:s:n:tqp:",
 			["help", "client=", "server=", "count=", "tcp", "quiet", "tap="])
 	except getopt.GetoptError as err:
-		print WeaveMessageLayer.WeaveMessageLayer.__doc__
-		print hred(str(err))
+		print(WeaveMessageLayer.WeaveMessageLayer.__doc__)
+		print(hred(str(err)))
                 sys.exit(hred("%s: Failed server parse arguments." % (__file__)))
 
 	for o, a in opts:
 		if o in ("-h", "--help"):
-			print WeaveMessageLayer.WeaveMessageLayer.__doc__
+			print(WeaveMessageLayer.WeaveMessageLayer.__doc__)
 			sys.exit(0)
 
 		elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-network-gateway.py b/src/test-apps/happy/bin/weave-network-gateway.py
index 2d52773..f55547b 100755
--- a/src/test-apps/happy/bin/weave-network-gateway.py
+++ b/src/test-apps/happy/bin/weave-network-gateway.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2016-2017 Nest Labs, Inc.
@@ -24,6 +24,8 @@
 #       The command is executed by instantiating and running WeaveNetworkGateway class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -39,13 +41,13 @@
                                    ["help", "id=", "quiet", "add", "delete", "gateway="])
 
     except getopt.GetoptError as err:
-        print WeaveNetworkGateway.WeaveNetworkGateway.__doc__
-        print hred(str(err))
+        print(WeaveNetworkGateway.WeaveNetworkGateway.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveNetworkGateway.WeaveNetworkGateway.__doc__
+            print(WeaveNetworkGateway.WeaveNetworkGateway.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-node-configure.py b/src/test-apps/happy/bin/weave-node-configure.py
index f5fff1f..e35b642 100755
--- a/src/test-apps/happy/bin/weave-node-configure.py
+++ b/src/test-apps/happy/bin/weave-node-configure.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -22,6 +22,8 @@
 #       A Happy command line utility that creates a record for a Weave Node
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -38,13 +40,13 @@
                                     "pairing-code=", "quiet", "delete"])
 
     except getopt.GetoptError as err:
-        print WeaveNodeConfigure.WeaveNodeConfigure.__doc__
-        print hred(str(err))
+        print(WeaveNodeConfigure.WeaveNodeConfigure.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveNodeConfigure.WeaveNodeConfigure.__doc__
+            print(WeaveNodeConfigure.WeaveNodeConfigure.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-pairing.py b/src/test-apps/happy/bin/weave-pairing.py
index 292803e..6bf3935 100755
--- a/src/test-apps/happy/bin/weave-pairing.py
+++ b/src/test-apps/happy/bin/weave-pairing.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeavePairing class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -41,13 +43,13 @@
             ["help", "quiet", "mobile=", "device=", "tap="])
 
     except getopt.GetoptError as err:
-        print WeavePairing.WeavePairing.__doc__
-        print hred(str(err))
+        print(WeavePairing.WeavePairing.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed destination parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeavePairing.WeavePairing.__doc__
+            print(WeavePairing.WeavePairing.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-ping.py b/src/test-apps/happy/bin/weave-ping.py
index 7fb6e39..cdd9e2e 100755
--- a/src/test-apps/happy/bin/weave-ping.py
+++ b/src/test-apps/happy/bin/weave-ping.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeavePing class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -40,13 +42,13 @@
                                    ["help", "origin=", "server=", "count=", "tcp", "udp", "wrmp", "interval=", "quiet",
                                     "tap=", "case", "case_cert_path=", "case_key_path="])
     except getopt.GetoptError as err:
-        print WeavePing.WeavePing.__doc__
-        print hred(str(err))
+        print(WeavePing.WeavePing.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed server parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeavePing.WeavePing.__doc__
+            print(WeavePing.WeavePing.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-register-service.py b/src/test-apps/happy/bin/weave-register-service.py
index e086be5..73e69a8 100755
--- a/src/test-apps/happy/bin/weave-register-service.py
+++ b/src/test-apps/happy/bin/weave-register-service.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -28,6 +28,7 @@
 
 from __future__ import print_function
 
+from __future__ import absolute_import
 import getopt
 import logging
 import logging.handlers
diff --git a/src/test-apps/happy/bin/weave-security-ping.py b/src/test-apps/happy/bin/weave-security-ping.py
index 6fb85e7..8efe6a3 100755
--- a/src/test-apps/happy/bin/weave-security-ping.py
+++ b/src/test-apps/happy/bin/weave-security-ping.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveSecurityPing class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -41,13 +43,13 @@
                          "CASE", "PASE", "group-key", "group-key-id=", "quiet", "tap=",
                          "server_faults=", "client_faults="])
 	except getopt.GetoptError as err:
-		print WeaveSecurityPing.WeaveSecurityPing.__doc__
-		print hred(str(err))
+		print(WeaveSecurityPing.WeaveSecurityPing.__doc__)
+		print(hred(str(err)))
                 sys.exit(hred("%s: Failed server parse arguments." % (__file__)))
 
 	for o, a in opts:
 		if o in ("-h", "--help"):
-			print WeaveSecurityPing.WeaveSecurityPing.__doc__
+			print(WeaveSecurityPing.WeaveSecurityPing.__doc__)
 			sys.exit(0)
 
 		elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-service-dir.py b/src/test-apps/happy/bin/weave-service-dir.py
index 4d4aaef..ecc1213 100755
--- a/src/test-apps/happy/bin/weave-service-dir.py
+++ b/src/test-apps/happy/bin/weave-service-dir.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveServiceDir class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -41,13 +43,13 @@
             ["help", "quiet", "client=", "service=", "tap="])
 
     except getopt.GetoptError as err:
-        print WeaveServiceDir.WeaveServiceDir.__doc__
-        print hred(str(err))
+        print(WeaveServiceDir.WeaveServiceDir.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed destination parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveServiceDir.WeaveServiceDir.__doc__
+            print(WeaveServiceDir.WeaveServiceDir.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-state-load.py b/src/test-apps/happy/bin/weave-state-load.py
index ff7c8b5..6fffae4 100755
--- a/src/test-apps/happy/bin/weave-state-load.py
+++ b/src/test-apps/happy/bin/weave-state-load.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2016-2017 Nest Labs, Inc.
@@ -23,6 +23,8 @@
 #       together with Weave fabric configuration.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -38,13 +40,13 @@
                                    ["help", "file=", "quiet"])
 
     except getopt.GetoptError as err:
-        print WeaveStateLoad.WeaveStateLoad.__doc__
-        print hred(str(err))
+        print(WeaveStateLoad.WeaveStateLoad.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveStateLoad.WeaveStateLoad.__doc__
+            print(WeaveStateLoad.WeaveStateLoad.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-state-unload.py b/src/test-apps/happy/bin/weave-state-unload.py
index 5c43ce7..003291c 100755
--- a/src/test-apps/happy/bin/weave-state-unload.py
+++ b/src/test-apps/happy/bin/weave-state-unload.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2016-2017 Nest Labs, Inc.
@@ -23,6 +23,8 @@
 #       together with Weave fabric configuration.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -38,13 +40,13 @@
                                    ["help", "file=", "quiet"])
 
     except getopt.GetoptError as err:
-        print WeaveStateUnload.WeaveStateUnload.__doc__
-        print hred(str(err))
+        print(WeaveStateUnload.WeaveStateUnload.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveStateUnload.WeaveStateUnload.__doc__
+            print(WeaveStateUnload.WeaveStateUnload.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-state.py b/src/test-apps/happy/bin/weave-state.py
index 7982db7..7f6537c 100755
--- a/src/test-apps/happy/bin/weave-state.py
+++ b/src/test-apps/happy/bin/weave-state.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2016-2017 Nest Labs, Inc.
@@ -22,6 +22,8 @@
 #       Display Weave node and fabric configuration
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -38,13 +40,13 @@
                                    ["help", "quiet"])
 
     except getopt.GetoptError as err:
-    	print WeaveState.WeaveState.__doc__
-        print hred(str(err))
+    	print(WeaveState.WeaveState.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveState.WeaveState.__doc__
+            print(WeaveState.WeaveState.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-swu.py b/src/test-apps/happy/bin/weave-swu.py
index 0a20391..cc4f320 100755
--- a/src/test-apps/happy/bin/weave-swu.py
+++ b/src/test-apps/happy/bin/weave-swu.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveSWU class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -41,13 +43,13 @@
              "integrity-type=", "update-scheme=", "announceable=", "tap="])
 
     except getopt.GetoptError as err:
-        print WeaveSWU.WeaveSWU.__doc__
-        print hred(str(err))
+        print(WeaveSWU.WeaveSWU.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed destination parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveSWU.WeaveSWU.__doc__
+            print(WeaveSWU.WeaveSWU.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-time.py b/src/test-apps/happy/bin/weave-time.py
index ae16046..7c07517 100755
--- a/src/test-apps/happy/bin/weave-time.py
+++ b/src/test-apps/happy/bin/weave-time.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveTime class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -39,13 +41,13 @@
 		opts, args = getopt.getopt(sys.argv[1:], "hc:o:s:qm:p:",
 			["help", "client=", "coordinator=", "server=", "quiet", "mode=", "tap="])
 	except getopt.GetoptError as err:
-		print WeaveTime.WeaveTime.__doc__
-		print hred(str(err))
+		print(WeaveTime.WeaveTime.__doc__)
+		print(hred(str(err)))
                 sys.exit(hred("%s: Failed server parse arguments." % (__file__)))
 
 	for o, a in opts:
 		if o in ("-h", "--help"):
-			print WeaveTime.WeaveTime.__doc__
+			print(WeaveTime.WeaveTime.__doc__)
 			sys.exit(0)
 
 		elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-tunnel-start.py b/src/test-apps/happy/bin/weave-tunnel-start.py
index 7258fee..69d6138 100755
--- a/src/test-apps/happy/bin/weave-tunnel-start.py
+++ b/src/test-apps/happy/bin/weave-tunnel-start.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveTunnelStart class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -41,13 +43,13 @@
              "service_dir_server=",  "case", "case_cert_path=", "case_key_path="])
 
     except getopt.GetoptError as err:
-        print WeaveTunnelStart.WeaveTunnelStart.__doc__
-        print hred(str(err))
+        print(WeaveTunnelStart.WeaveTunnelStart.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveTunnelStart.WeaveTunnelStart.__doc__
+            print(WeaveTunnelStart.WeaveTunnelStart.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-tunnel-stop.py b/src/test-apps/happy/bin/weave-tunnel-stop.py
index 8830f88..148b448 100755
--- a/src/test-apps/happy/bin/weave-tunnel-stop.py
+++ b/src/test-apps/happy/bin/weave-tunnel-stop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveTunnelStop class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -40,13 +42,13 @@
             ["help", "border_gateway=", "service=", "quiet"])
 
     except getopt.GetoptError as err:
-        print WeaveTunnelStop.WeaveTunnelStop.__doc__
-        print hred(str(err))
+        print(WeaveTunnelStop.WeaveTunnelStop.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveTunnelStop.WeaveTunnelStop.__doc__
+            print(WeaveTunnelStop.WeaveTunnelStop.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-wdm-next.py b/src/test-apps/happy/bin/weave-wdm-next.py
index 42e696a..aece8f6 100755
--- a/src/test-apps/happy/bin/weave-wdm-next.py
+++ b/src/test-apps/happy/bin/weave-wdm-next.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveWdmNext class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -62,13 +64,13 @@
              "save_server_perf=", "swap_role=", "case", "case_cert_path=", "case_key_path=", "group_enc", "group_enc_key_id="])
 
     except getopt.GetoptError as err:
-        print WeaveWdmNext.WeaveWdmNext.__doc__
-        print hred(str(err))
+        print(WeaveWdmNext.WeaveWdmNext.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed server parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print helpstring
+            print(helpstring)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
@@ -159,7 +161,7 @@
             options["group_enc_key_id"] = a
 
         else:
-            print hred(str(o) + " cannot be recognized")
+            print(hred(str(o) + " cannot be recognized"))
             assert False, "unhandled option"
 
         if len(args) == 1:
diff --git a/src/test-apps/happy/bin/weave-wdmv0.py b/src/test-apps/happy/bin/weave-wdmv0.py
index dcf15ac..ff5fa5d 100755
--- a/src/test-apps/happy/bin/weave-wdmv0.py
+++ b/src/test-apps/happy/bin/weave-wdmv0.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveWDMv0 class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -41,13 +43,13 @@
             ["help", "quiet", "server=", "client=", "tap="])
 
     except getopt.GetoptError as err:
-        print WeaveWDMv0.WeaveWDMv0.__doc__
-        print hred(str(err))
+        print(WeaveWDMv0.WeaveWDMv0.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed destination parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print WeaveWDMv0.WeaveWDMv0.__doc__
+            print(WeaveWDMv0.WeaveWDMv0.__doc__)
             sys.exit(0)
 
         elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/bin/weave-wrmp.py b/src/test-apps/happy/bin/weave-wrmp.py
index b6f0eb9..57e357c 100755
--- a/src/test-apps/happy/bin/weave-wrmp.py
+++ b/src/test-apps/happy/bin/weave-wrmp.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The command is executed by instantiating and running WeaveWRMP class.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import set_test_path
@@ -40,13 +42,13 @@
 			["help", "client=", "server=",
 				"retransmit=", "test=", "quiet"])
 	except getopt.GetoptError as err:
-		print WeaveWRMP.WeaveWRMP.__doc__
-		print hred(str(err))
+		print(WeaveWRMP.WeaveWRMP.__doc__)
+		print(hred(str(err)))
                 sys.exit(hred("%s: Failed server parse arguments." % (__file__)))
 
 	for o, a in opts:
 		if o in ("-h", "--help"):
-			print WeaveWRMP.WeaveWRMP.__doc__
+			print(WeaveWRMP.WeaveWRMP.__doc__)
 			sys.exit(0)
 
 		elif o in ("-q", "--quiet"):
diff --git a/src/test-apps/happy/lib/Weave.py b/src/test-apps/happy/lib/Weave.py
index 6393c4b..dc6e048 100644
--- a/src/test-apps/happy/lib/Weave.py
+++ b/src/test-apps/happy/lib/Weave.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2015-2017 Nest Labs, Inc.
@@ -22,6 +22,7 @@
 #       Implements Weave class that wraps around standalone Weave code library.
 #
 
+from __future__ import absolute_import
 import os
 import sys
 
@@ -45,13 +46,13 @@
 
     def __check_weave_path(self):
         # Pick weave path from configuration
-        if "weave_path" in self.configuration.keys():
+        if "weave_path" in list(self.configuration.keys()):
             self.weave_happy_conf_path = self.configuration["weave_path"]
             emsg = "Found weave path: %s." % (self.weave_happy_conf_path)
             self.logger.debug("[localhost] Weave: %s" % (emsg))
 
         # Check if Weave build path is set
-        if "abs_builddir" in os.environ.keys():
+        if "abs_builddir" in list(os.environ.keys()):
             self.weave_build_path = os.environ['abs_builddir']
             emsg = "Found weave abs_builddir: %s." % (self.weave_build_path)
             self.logger.debug("[localhost] Weave: %s" % (emsg))
@@ -87,17 +88,17 @@
             return cmd_path
 
     def __setup_weave_cert_path(self):
-        if "weave_cert_path" in self.configuration.keys():
+        if "weave_cert_path" in list(self.configuration.keys()):
             self.weave_cert_path = self.configuration['weave_cert_path']
             self.weave_cert_path = os.path.expandvars(self.weave_cert_path)
             self.weave_cert_path.rstrip('/')
 
-        elif "abs_top_srcdir" in os.environ.keys():
+        elif "abs_top_srcdir" in list(os.environ.keys()):
                 emsg = "Found weave source path: %s" % os.environ['abs_top_srcdir']
                 self.logger.debug("[localhost] Weave: %s" % (emsg))
                 self.weave_cert_path = os.environ['abs_top_srcdir'].rstrip('/') + '/certs/development'
 
-        elif "WEAVE_HOME" in os.environ.keys():
+        elif "WEAVE_HOME" in list(os.environ.keys()):
                 emsg = "Found weave source path: %s" % os.environ['WEAVE_HOME']
                 self.logger.debug("[localhost] Weave: %s" % (emsg))
                 self.weave_cert_path = '${WEAVE_HOME}/certs/development'
diff --git a/src/test-apps/happy/lib/WeaveCerts.py b/src/test-apps/happy/lib/WeaveCerts.py
index 96d2854..8b9fbbf 100644
--- a/src/test-apps/happy/lib/WeaveCerts.py
+++ b/src/test-apps/happy/lib/WeaveCerts.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -23,6 +23,8 @@
 #       and private keys for test Weave devices and service endpoints.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import glob
 import re
@@ -204,7 +206,7 @@
             id = match.groups()[0]
             file_type = match.groups()[1]
 
-            if id not in self.device_certs.keys():
+            if id not in list(self.device_certs.keys()):
                 self.device_certs[id] = {}
             self.device_certs[id][file_type] = abs_path
 
@@ -264,10 +266,10 @@
     if device_certs:
         node_id = random.choice(list(device_certs))
         node_cert = device_certs[node_id]
-        print "id: %s\ncert: %s\nkey: %s" % (node_id, node_cert['cert'], node_cert['key'])
-        print node_id, ": ", json.dumps(node_cert, indent=4)
+        print("id: %s\ncert: %s\nkey: %s" % (node_id, node_cert['cert'], node_cert['key']))
+        print(node_id, ": ", json.dumps(node_cert, indent=4))
 
     se_certs = weave_certs.getServiceEndpointCerts()
     if se_certs:
         tunnel_cert = se_certs["tunnel"]
-        print "tunnel: ", json.dumps(tunnel_cert, indent=4)
+        print("tunnel: ", json.dumps(tunnel_cert, indent=4))
diff --git a/src/test-apps/happy/lib/WeaveDeviceManager.py b/src/test-apps/happy/lib/WeaveDeviceManager.py
index d4ad893..5fb0de0 100644
--- a/src/test-apps/happy/lib/WeaveDeviceManager.py
+++ b/src/test-apps/happy/lib/WeaveDeviceManager.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017-2018 Nest Labs, Inc.
@@ -23,6 +23,8 @@
 #       Acts a wrapper for WeaveDeviceMgr.py
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import random
 import os
 import sys
@@ -32,11 +34,10 @@
 import shlex
 import base64
 import json
-import set_test_path
 import logging
 
 weaveDeviceMgrPath = os.environ['WEAVE_DEVICE_MGR_PATH']
-print 'weaveDeviceMgrPath is %s' % weaveDeviceMgrPath
+print('weaveDeviceMgrPath is %s' % weaveDeviceMgrPath)
 
 if os.path.exists(weaveDeviceMgrPath):
     sys.path.append(weaveDeviceMgrPath)
@@ -44,27 +45,27 @@
 try:
     from openweave import WeaveStack
 except Exception as ex:
-    print ("Failed to import WeaveStack: %s" % (str(ex)))
+    print(("Failed to import WeaveStack: %s" % (str(ex))))
 
 try:
     from openweave import WeaveDeviceMgr
 except Exception as ex:
-    print ("Failed to import WeaveDeviceMgr: %s" % (str(ex)))
+    print(("Failed to import WeaveDeviceMgr: %s" % (str(ex))))
 
 try:
     from openweave import WdmClient
 except Exception as ex:
-    print ("Failed to import WdmClient: %s" % (str(ex)))
+    print(("Failed to import WdmClient: %s" % (str(ex))))
 
 try:
     from openweave import GenericTraitUpdatableDataSink
 except Exception as ex:
-    print ("Failed to import GenericTraitUpdatableDataSink: %s" % (str(ex)))
+    print(("Failed to import GenericTraitUpdatableDataSink: %s" % (str(ex))))
 
 try:
     from openweave import ResourceIdentifier
 except Exception as ex:
-    print ("Failed to import ResourceIdentifier: %s" % (str(ex)))
+    print(("Failed to import ResourceIdentifier: %s" % (str(ex))))
 
 # Dummy Access Token
 #
@@ -114,13 +115,13 @@
         if (lastNetworkId != None):
             return lastNetworkId
         else:
-            print "No last network id"
+            print("No last network id")
             return None
 
     try:
         return int(value)
     except ValueError:
-        print "Invalid network id"
+        print("Invalid network id")
         return None
 
 class MockWeaveDataManagementClientImp():
@@ -130,8 +131,8 @@
     def createWdmClient(self):
         try:
             self.wdmClient = WdmClient.WdmClient()
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
     def closeWdmClient(self):
@@ -139,27 +140,27 @@
             if self.wdmClient:
                 self.wdmClient.close()
                 self.wdmClient = None
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
-        print "close wdm client complete"
+        print("close wdm client complete")
 
     def setNodeId(self, val):
         try:
             if self.wdmClient:
                 self.wdmClient.setNodeId(val)
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
-        print "close wdm client complete"
+        print("close wdm client complete")
 
     def newDataSink(self, statusProfileId, instanceid, path, testResOption="default"):
         """
           new-data-sink <statusProfileId, instanceid, path>
         """
         if self.wdmClient == None:
-            print "wdmclient not initialized"
+            print("wdmclient not initialized")
             return
 
         if testResOption == "default" :
@@ -171,66 +172,66 @@
 
         try:
             traitInstance = self.wdmClient.newDataSink(resourceIdentifier, statusProfileId, instanceid, path)
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
-        print "new data sink complete"
+        print("new data sink complete")
         return traitInstance
 
     def flushUpdate(self):
         if self.wdmClient == None:
-            print "wdmclient not initialized"
+            print("wdmclient not initialized")
             return
 
         try:
             result = self.wdmClient.flushUpdate()
-            print "flushUpdate Complete"
-            print result
+            print("flushUpdate Complete")
+            print(result)
             return result
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
     def refreshData(self):
         if self.wdmClient == None:
-            print "wdmclient not initialized"
+            print("wdmclient not initialized")
             return
 
         try:
             result = self.wdmClient.refreshData()
-            print "refresh trait data complete"
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+            print("refresh trait data complete")
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
     def refreshIndividualData(self, traitInstance):
         if self.wdmClient == None or traitInstance == None:
-            print "wdmclient or traitInstance not initialized"
+            print("wdmclient or traitInstance not initialized")
             return
 
         try:
             result = traitInstance.refreshData()
-            print "refresh individual trait data complete"
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+            print("refresh individual trait data complete")
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
     def closeIndividualTrait(self, traitInstance):
         if self.wdmClient == None or traitInstance == None:
-            print "wdmclient or traitInstance not initialized"
+            print("wdmclient or traitInstance not initialized")
             return
 
         try:
             traitInstance.close()
-            print "close current trait"
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+            print("close current trait")
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
     def setData(self, traitInstance, path, value):
         if self.wdmClient == None or traitInstance == None:
-            print "wdmclient or traitInstance not initialized"
+            print("wdmclient or traitInstance not initialized")
             return
 
         isConditional = False
@@ -242,310 +243,334 @@
 
         try:
             traitInstance.setData(path, val, isConditional)
-            print "set string data in trait complete"
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+            print("set string data in trait complete")
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
     def getData(self, traitInstance, path):
         if self.wdmClient == None or traitInstance == None:
-            print "wdmclient or traitInstance not initialized"
+            print("wdmclient or traitInstance not initialized")
             return
 
         try:
             val = traitInstance.getData(path)
-            print "get data in trait complete"
-            print val
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+            print("get data in trait complete")
+            print(val)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
     def getVersion(self, traitInstance):
         if self.wdmClient == None or traitInstance == None:
-            print "wdmclient or traitInstance not initialized"
+            print("wdmclient or traitInstance not initialized")
             return
 
         try:
             val = traitInstance.getVersion()
-            print val
+            print(val)
             return val
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
     def clearTrait(self, traitInstance):
         if self.wdmClient == None or traitInstance == None:
-            print "wdmclient or traitInstance not initialized"
+            print("wdmclient or traitInstance not initialized")
             return
 
         try:
             traitInstance.clear()
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
     def deleteData(self, traitInstance, path):
         if self.wdmClient == None or traitInstance == None:
-            print "wdmclient or traitInstance not initialized"
+            print("wdmclient or traitInstance not initialized")
             return
 
         try:
             traitInstance.deleteData(path)
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             return
 
 def testWdmClientCreateClose(testObject):
     testObject.createWdmClient()
     testObject.closeWdmClient()
-    print "testWdmClientCreationClose completes"
+    print("testWdmClientCreationClose completes")
 
 def testWdmClientDataSinkCreateClose(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkCreateClose completes"
+    print("testWdmClientDataSinkCreateClose completes")
 
 def testWdmClientDataSinkEmptyFlushData(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
     results = testObject.flushUpdate()
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkEmptyFlushData completes"
+    print("testWdmClientDataSinkEmptyFlushData completes")
 
 def testWdmClientDataSinkSetFlushData(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
-    testObject.setData(localeSettingsTrait, "/1", "en-US")
-    testObject.setData(TestCTrait, "/1", False)
-    testObject.setData(TestCTrait, "/2", 15)
-    testObject.setData(TestCTrait, "/3/1", 16)
-    testObject.setData(TestCTrait, "/3/2", False)
-    testObject.setData(TestCTrait, "/4", 17)
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
+    testObject.setData(localeSettingsTrait, b"/1", b"en-US")
+    testObject.setData(TestCTrait, b"/1", False)
+    testObject.setData(TestCTrait, b"/2", 15)
+    testObject.setData(TestCTrait, b"/3/1", 16)
+    testObject.setData(TestCTrait, b"/3/2", False)
+    testObject.setData(TestCTrait, b"/4", 17)
     results = testObject.flushUpdate()
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkSetFlushData completes"
+    print("testWdmClientDataSinkSetFlushData completes")
 
 def testWdmClientDataSinkSetFlushInvalidData(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
-    testObject.setData(localeSettingsTrait, "/1", 0.1)
-    testObject.setData(TestCTrait, "/1", False)
-    testObject.setData(TestCTrait, "/2", 15)
-    testObject.setData(TestCTrait, "/3/1", "TESTTEST")
-    testObject.setData(TestCTrait, "/3/2", False)
-    testObject.setData(TestCTrait, "/4", 17)
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
+    testObject.setData(localeSettingsTrait, b"/1", 0.1)
+    testObject.setData(TestCTrait, b"/1", False)
+    testObject.setData(TestCTrait, b"/2", 15)
+    testObject.setData(TestCTrait, b"/3/1", b"TESTTEST")
+    testObject.setData(TestCTrait, b"/3/2", False)
+    testObject.setData(TestCTrait, b"/4", 17)
     results1 = testObject.flushUpdate()
     if len(results1) != 2:
         raise ValueError("testWdmClientDataSinkSetFlushInvalidData stage1  fails")
-    print "testWdmClientDataSinkSetFlushInvalidData stage1 completes"
+    print("testWdmClientDataSinkSetFlushInvalidData stage1 completes")
 
     results2 = testObject.flushUpdate()
     if len(results2) != 0:
         raise ValueError("testWdmClientDataSinkSetFlushInvalidData stage2  fails")
-    print "testWdmClientDataSinkSetFlushInvalidData stage2 completes"
+    print("testWdmClientDataSinkSetFlushInvalidData stage2 completes")
 
     for ele in results1:
-        print "clear trait: " + str(ele.dataSink.profileId)
-        print "clear trait path:" + str(ele.path)
-        testObject.deleteData(ele.dataSink, ele.path)
+        print("clear trait: " + str(ele.dataSink.profileId))
+        print("clear trait path:" + str(ele.path))
+        testObject.deleteData(ele.dataSink, ele.path.encode('utf8'))
 
     results3 = testObject.flushUpdate()
     if len(results3) != 0:
         raise ValueError("testWdmClientDataSinkSetFlushInvalidData stage3  fails")
 
-    testObject.setData(TestCTrait, "/4", 20)
+    testObject.setData(TestCTrait, b"/4", 20)
     results4 = testObject.flushUpdate()
     if len(results4) != 0:
         raise ValueError("testWdmClientDataSinkSetFlushInvalidData stage4  fails")
 
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkSetFlushInvalidData completes"
+    print("testWdmClientDataSinkSetFlushInvalidData completes")
 
 def testWdmClientDataSinkSetFlushDataDeleteData(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
-    testObject.setData(localeSettingsTrait, "/1", "en-US")
-    testObject.setData(TestCTrait, "/1", False)
-    testObject.setData(TestCTrait, "/2", 15)
-    testObject.setData(TestCTrait, "/3/1", 16)
-    testObject.setData(TestCTrait, "/3/2", False)
-    testObject.setData(TestCTrait, "/4", 17)
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
+    testObject.setData(localeSettingsTrait, b"/1", b"en-US")
+    testObject.setData(TestCTrait, b"/1", False)
+    testObject.setData(TestCTrait, b"/2", 15)
+    testObject.setData(TestCTrait, b"/3/1", 16)
+    testObject.setData(TestCTrait, b"/3/2", False)
+    testObject.setData(TestCTrait, b"/4", 17)
 
-    testObject.deleteData(localeSettingsTrait, "/1")
-    testObject.deleteData(TestCTrait, "/1")
-    testObject.deleteData(TestCTrait, "/2")
-    testObject.deleteData(TestCTrait, "/3/1")
-    testObject.deleteData(TestCTrait, "/3/2")
+    testObject.deleteData(localeSettingsTrait, b"/1")
+    testObject.deleteData(TestCTrait, b"/1")
+    testObject.deleteData(TestCTrait, b"/2")
+    testObject.deleteData(TestCTrait, b"/3/1")
+    testObject.deleteData(TestCTrait, b"/3/2")
 
     results = testObject.flushUpdate()
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkSetFlushDataDeleteData completes"
+    print("testWdmClientDataSinkSetFlushDataDeleteData completes")
 
 def testWdmClientDataSinkSetClearFlushData(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
-    testObject.setData(localeSettingsTrait, "/1", "en-US")
-    testObject.setData(TestCTrait, "/1", False)
-    testObject.setData(TestCTrait, "/2", 15)
-    testObject.setData(TestCTrait, "/3/1", 16)
-    testObject.setData(TestCTrait, "/3/2", False)
-    testObject.setData(TestCTrait, "/4", 17)
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
+    testObject.setData(localeSettingsTrait, b"/1", b"en-US")
+    testObject.setData(TestCTrait, b"/1", False)
+    testObject.setData(TestCTrait, b"/2", 15)
+    testObject.setData(TestCTrait, b"/3/1", 16)
+    testObject.setData(TestCTrait, b"/3/2", False)
+    testObject.setData(TestCTrait, b"/4", 17)
 
     testObject.clearTrait(localeSettingsTrait)
     testObject.clearTrait(TestCTrait)
 
     results = testObject.flushUpdate()
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkSetClearFlushData completes"
+    print("testWdmClientDataSinkSetClearFlushData completes")
 
 def testWdmClientDataSinkRefreshIndividualGetDataRefresh(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
     testObject.refreshIndividualData(localeSettingsTrait)
-    testObject.getData(localeSettingsTrait, "/1")
+    testObject.getData(localeSettingsTrait, b"/1")
     testObject.refreshIndividualData(TestCTrait)
     TestCTraitVersion = testObject.getVersion(TestCTrait)
-    testObject.getData(TestCTrait, "/1")
-    testObject.getData(TestCTrait, "/2")
-    testObject.getData(TestCTrait, "/3/1")
-    testObject.getData(TestCTrait, "/3/2")
-    testObject.getData(TestCTrait, "/4")
+    testObject.getData(TestCTrait, b"/1")
+    testObject.getData(TestCTrait, b"/2")
+    testObject.getData(TestCTrait, b"/3/1")
+    testObject.getData(TestCTrait, b"/3/2")
+    testObject.getData(TestCTrait, b"/4")
     testObject.refreshIndividualData(TestCTrait)
     TestCTraitVersion = testObject.getVersion(TestCTrait)
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkRefreshIndividualGetDataRefresh completes"
+    print("testWdmClientDataSinkRefreshIndividualGetDataRefresh completes")
 
 def testWdmClientDataSinkRefreshGetDataRefresh(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
     refreshResults1 = testObject.refreshData()
 
     localeSettingsTraitVersion = testObject.getVersion(localeSettingsTrait)
     TestCTraitVersion = testObject.getVersion(TestCTrait)
-    testObject.getData(localeSettingsTrait, "/1")
-    testObject.getData(TestCTrait, "/1")
-    testObject.getData(TestCTrait, "/2")
-    testObject.getData(TestCTrait, "/3/1")
-    testObject.getData(TestCTrait, "/3/2")
-    testObject.getData(TestCTrait, "/4")
+    testObject.getData(localeSettingsTrait, b"/1")
+    testObject.getData(TestCTrait, b"/1")
+    testObject.getData(TestCTrait, b"/2")
+    testObject.getData(TestCTrait, b"/3/1")
+    testObject.getData(TestCTrait, b"/3/2")
+    testObject.getData(TestCTrait, b"/4")
 
     refreshResults2 = testObject.refreshData()
 
     localeSettingsTraitVersion = testObject.getVersion(localeSettingsTrait)
     TestCTraitVersion = testObject.getVersion(TestCTrait)
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkRefreshGetDataRefresh completes"
+    print("testWdmClientDataSinkRefreshGetDataRefresh completes")
 
 def testWdmClientDataSinkCloseIndividualData(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
     refreshResults1 = testObject.refreshIndividualData(localeSettingsTrait)
     testObject.closeIndividualTrait(localeSettingsTrait)
     refreshResults2 = testObject.refreshIndividualData(TestCTrait)
     testObject.closeIndividualTrait(TestCTrait)
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkCloseIndividualData completes"
+    print("testWdmClientDataSinkCloseIndividualData completes")
 
 def testWdmClientDataSinkSetFlushRefreshGetData(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    localeCapabilitiesTrait = testObject.newDataSink(21, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
-    testObject.setData(localeSettingsTrait, "/1", "en-US")
-    testObject.setData(localeCapabilitiesTrait, "/2", ["en-US", "zh-TW"])
-    testObject.setData(TestCTrait, "/1", False)
-    testObject.setData(TestCTrait, "/2", 15)
-    testObject.setData(TestCTrait, "/3/1", 16)
-    testObject.setData(TestCTrait, "/3/2", False)
-    testObject.setData(TestCTrait, "/4", 17)
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    localeCapabilitiesTrait = testObject.newDataSink(21, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
+    testObject.setData(localeSettingsTrait, b"/1", b"en-US")
+    testObject.setData(localeCapabilitiesTrait, b"/2", [b"en-US", b"zh-TW"])
+    testObject.setData(TestCTrait, b"/1", False)
+    testObject.setData(TestCTrait, b"/2", 15)
+    testObject.setData(TestCTrait, b"/3/1", 16)
+    testObject.setData(TestCTrait, b"/3/2", False)
+    testObject.setData(TestCTrait, b"/4", 17)
     testObject.flushUpdate()
     testObject.refreshData()
-    testObject.getData(localeSettingsTrait, "/1")
-    testObject.getData(localeCapabilitiesTrait, "/2")
-    testObject.getData(TestCTrait, "/1")
-    testObject.getData(TestCTrait, "/2")
-    testObject.getData(TestCTrait, "/3/1")
-    testObject.getData(TestCTrait, "/3/2")
-    testObject.getData(TestCTrait, "/4")
+    testObject.getData(localeSettingsTrait, b"/1")
+    testObject.getData(localeCapabilitiesTrait, b"/2")
+    testObject.getData(TestCTrait, b"/1")
+    testObject.getData(TestCTrait, b"/2")
+    testObject.getData(TestCTrait, b"/3/1")
+    testObject.getData(TestCTrait, b"/3/2")
+    testObject.getData(TestCTrait, b"/4")
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkSetFlushRefreshGetData completes"
+    print("testWdmClientDataSinkSetFlushRefreshGetData completes")
 
 def testWdmClientDataSinkSetRefreshFlushGetData(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/")
-    testObject.setData(localeSettingsTrait, "/1", "en-US")
-    testObject.setData(TestCTrait, "/1", False)
-    testObject.setData(TestCTrait, "/2", 15)
-    testObject.setData(TestCTrait, "/3/1", 16)
-    testObject.setData(TestCTrait, "/3/2", False)
-    testObject.setData(TestCTrait, "/4", 17)
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/")
+    testObject.setData(localeSettingsTrait, b"/1", b"en-US")
+    testObject.setData(TestCTrait, b"/1", False)
+    testObject.setData(TestCTrait, b"/2", 15)
+    testObject.setData(TestCTrait, b"/3/1", 16)
+    testObject.setData(TestCTrait, b"/3/2", False)
+    testObject.setData(TestCTrait, b"/4", 17)
     testObject.refreshData()
     testObject.flushUpdate()
-    testObject.getData(localeSettingsTrait, "/1")
-    testObject.getData(TestCTrait, "/1")
-    testObject.getData(TestCTrait, "/2")
-    testObject.getData(TestCTrait, "/3/1")
-    testObject.getData(TestCTrait, "/3/2")
-    testObject.getData(TestCTrait, "/4")
+    testObject.getData(localeSettingsTrait, b"/1")
+    testObject.getData(TestCTrait, b"/1")
+    testObject.getData(TestCTrait, b"/2")
+    testObject.getData(TestCTrait, b"/3/1")
+    testObject.getData(TestCTrait, b"/3/2")
+    testObject.getData(TestCTrait, b"/4")
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkSetRefreshFlushGetData completes"
+    print("testWdmClientDataSinkSetRefreshFlushGetData completes")
 
 def testWdmClientDataSinkResourceIdentifierMakeResTypeIdInt(testObject):
     testObject.createWdmClient()
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/", "ResTypeIdInt")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/", "ResTypeIdInt")
-    testObject.setData(localeSettingsTrait, "/1", "en-US")
-    testObject.setData(TestCTrait, "/1", False)
-    testObject.setData(TestCTrait, "/2", 15)
-    testObject.setData(TestCTrait, "/3/1", 16)
-    testObject.setData(TestCTrait, "/3/2", False)
-    testObject.setData(TestCTrait, "/4", 17)
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/", "ResTypeIdInt")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/", "ResTypeIdInt")
+    testObject.setData(localeSettingsTrait, b"/1", b"en-US")
+    testObject.setData(TestCTrait, b"/1", False)
+    testObject.setData(TestCTrait, b"/2", 15)
+    testObject.setData(TestCTrait, b"/3/1", 16)
+    testObject.setData(TestCTrait, b"/3/2", False)
+    testObject.setData(TestCTrait, b"/4", 17)
     testObject.flushUpdate()
     testObject.refreshData()
-    testObject.getData(localeSettingsTrait, "/1")
-    testObject.getData(TestCTrait, "/1")
-    testObject.getData(TestCTrait, "/2")
-    testObject.getData(TestCTrait, "/3/1")
-    testObject.getData(TestCTrait, "/3/2")
-    testObject.getData(TestCTrait, "/4")
+    testObject.getData(localeSettingsTrait, b"/1")
+    testObject.getData(TestCTrait, b"/1")
+    testObject.getData(TestCTrait, b"/2")
+    testObject.getData(TestCTrait, b"/3/1")
+    testObject.getData(TestCTrait, b"/3/2")
+    testObject.getData(TestCTrait, b"/4")
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkResourceIdentifierMakeResTypeIdInt completes"
+    print("testWdmClientDataSinkResourceIdentifierMakeResTypeIdInt completes")
 
 def testWdmClientDataSinkResourceIdentifierMakeResTypeIdBytes(testObject):
     testObject.createWdmClient()
     testObject.setNodeId(-2)
-    localeSettingsTrait = testObject.newDataSink(20, 0, "/", "ResTypeIdBytes")
-    TestCTrait = testObject.newDataSink(593165827, 0, "/", "ResTypeIdBytes")
+    localeSettingsTrait = testObject.newDataSink(20, 0, b"/", "ResTypeIdBytes")
+    TestCTrait = testObject.newDataSink(593165827, 0, b"/", "ResTypeIdBytes")
+    testObject.setData(localeSettingsTrait, b"/1", b"en-US")
+    testObject.setData(TestCTrait, b"/1", False)
+    testObject.setData(TestCTrait, b"/2", 15)
+    testObject.setData(TestCTrait, b"/3/1", 16)
+    testObject.setData(TestCTrait, b"/3/2", False)
+    testObject.setData(TestCTrait, b"/4", 17)
+    testObject.flushUpdate()
+    testObject.refreshData()
+    testObject.getData(localeSettingsTrait, b"/1")
+    testObject.getData(TestCTrait, b"/1")
+    testObject.getData(TestCTrait, b"/2")
+    testObject.getData(TestCTrait, b"/3/1")
+    testObject.getData(TestCTrait, b"/3/2")
+    testObject.getData(TestCTrait, b"/4")
+    testObject.closeWdmClient()
+    print("testWdmClientDataSinkResourceIdentifierMakeResTypeIdBytes completes")
+
+def testWdmClientDataSinkSetFlushInvalidInstanceId(testObject):
+    testObject.createWdmClient()
+    localeSettingsTrait = testObject.newDataSink(20, 1, "/")
+    TestCTrait = testObject.newDataSink(593165827, 0, "/")
     testObject.setData(localeSettingsTrait, "/1", "en-US")
     testObject.setData(TestCTrait, "/1", False)
     testObject.setData(TestCTrait, "/2", 15)
     testObject.setData(TestCTrait, "/3/1", 16)
     testObject.setData(TestCTrait, "/3/2", False)
     testObject.setData(TestCTrait, "/4", 17)
-    testObject.flushUpdate()
-    testObject.refreshData()
-    testObject.getData(localeSettingsTrait, "/1")
-    testObject.getData(TestCTrait, "/1")
-    testObject.getData(TestCTrait, "/2")
-    testObject.getData(TestCTrait, "/3/1")
-    testObject.getData(TestCTrait, "/3/2")
-    testObject.getData(TestCTrait, "/4")
+    result = testObject.flushUpdate()
+    if len(result) != 1:
+        raise ValueError("testWdmClientDataSinkSetFlushInvalidInstanceId fails")
+    else:
+        if not (result[0].profileId == 0xb and result[0].statusCode == 0x21):
+            raise ValueError("testWdmClientDataSinkSetFlushInvalidInstanceId profileId and StatusCode check fails")
+
+        print "clear trait: " + str(result[0].dataSink.profileId)
+        print "clear trait path:" + str(result[0].path)
+        testObject.deleteData(result[0].dataSink, result[0].path)
+
     testObject.closeWdmClient()
-    print "testWdmClientDataSinkResourceIdentifierMakeResTypeIdBytes completes"
+    print "testWdmClientDataSinkSetFlushInvalidInstanceId completes"
 
 def RunWdmClientTest():
-    print "Run Weave Data Management Test"
+    print("Run Weave Data Management Test")
     testObject = MockWeaveDataManagementClientImp()
     testWdmClientCreateClose(testObject)
     testWdmClientDataSinkEmptyFlushData(testObject)
@@ -561,8 +586,9 @@
     testWdmClientDataSinkSetRefreshFlushGetData(testObject)
     testWdmClientDataSinkResourceIdentifierMakeResTypeIdInt(testObject)
     testWdmClientDataSinkResourceIdentifierMakeResTypeIdBytes(testObject)
+    testWdmClientDataSinkSetFlushInvalidInstanceId(testObject)
 
-    print "Run Weave Data Management Complete"
+    print("Run Weave Data Management Complete")
 
 class ExtendedOption (Option):
     TYPES = Option.TYPES + ("base64", "hexint", )
@@ -587,11 +613,11 @@
 
     optParser = OptionParser(usage=optparse.SUPPRESS_USAGE, option_class=ExtendedOption)
 
-    print "Connecting to device ..."
+    print("Connecting to device ...")
 
 
-    print ''
-    print '#################################connect#################################'
+    print('')
+    print('#################################connect#################################')
     optParser.add_option("", "--pairing-code", action="store", dest="pairingCode", type="string")
     optParser.add_option("", "--access-token", action="store", dest="accessToken", type="base64")
     optParser.add_option("", "--use-dummy-access-token", action="store_true", dest="useDummyAccessToken")
@@ -602,13 +628,14 @@
     optParser.add_option("", "--init-data", action="store", dest="init_data")
     optParser.add_option("", "--ble-src-addr", action="store", dest="bleSrcAddr")
     optParser.add_option("", "--ble-dst-addr", action="store", dest="bleDstAddr")
+
     try:
         (options, remainingArgs) = optParser.parse_args(args)
     except SystemExit:
         exit()
 
     if (len(remainingArgs) > 2):
-        print "Unexpected argument: " + remainingArgs[2]
+        print("Unexpected argument: " + remainingArgs[2])
         exit()
 
     if not options.useBle:
@@ -624,7 +651,7 @@
     if (options.useDummyAccessToken and not options.accessToken):
         options.accessToken = base64.standard_b64decode(dummyAccessToken)
     if (options.pairingCode and options.accessToken):
-        print "Cannot specify both pairing code and access token"
+        print("Cannot specify both pairing code and access token")
         exit()
 
     try:
@@ -635,15 +662,15 @@
 
             try:
                 bleManager.ble_adapter_select(identifier=options.bleSrcAddr)
-            except WeaveStack.WeaveStackException, ex:
-                print ex
+            except WeaveStack.WeaveStackException as ex:
+                print(ex)
                 exit()
 
             try:
                 line = ' ' + str(options.bleDstAddr)
                 bleManager.scan_connect(line)
-            except WeaveStack.WeaveStackException, ex:
-                print ex
+            except WeaveStack.WeaveStackException as ex:
+                print(ex)
                 exit()
 
             devMgr.ConnectBle(bleConnection=FAKE_CONN_OBJ_VALUE,
@@ -655,12 +682,12 @@
                 devMgr.Close()
                 devMgr.CloseEndpoints()
                 bleManager.disconnect()
-            except WeaveStack.WeaveStackException, ex:
-                print str(ex)
+            except WeaveStack.WeaveStackException as ex:
+                print(str(ex))
                 exit()
 
-            print "WoBLE central is good to go"
-            print "Shutdown complete"
+            print("WoBLE central is good to go")
+            print("Shutdown complete")
             exit()
 
         else:
@@ -668,18 +695,18 @@
                                       pairingCode=options.pairingCode,
                                       accessToken=options.accessToken)
 
-    except WeaveStack.WeaveStackException, ex:
-        print ex
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
         exit()
 
 
     if options.account_id is not None and options.service_config is not None and options.init_data is not None and options.pairing_token is not None:
-        print ''
-        print '#################################register-real-NestService#################################'
+        print('')
+        print('#################################register-real-NestService#################################')
         try:
             devMgr.RegisterServicePairAccount(0x18B4300200000010, options.account_id, base64.b64decode(options.service_config), options.pairing_token, options.init_data)
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             exit()
 
         """
@@ -696,81 +723,81 @@
 
         print "Unregister service done"
         """
-        print ''
-        print '#################################close#################################'
+        print('')
+        print('#################################close#################################')
 
         try:
             devMgr.Close()
             devMgr.CloseEndpoints()
-        except WeaveStack.WeaveStackException, ex:
-            print str(ex)
+        except WeaveStack.WeaveStackException as ex:
+            print(str(ex))
             exit()
-        print "Shutdown complete"
+        print("Shutdown complete")
         exit()
 
-    print ''
-    print '#################################close#################################'
+    print('')
+    print('#################################close#################################')
 
     try:
         devMgr.Close()
         devMgr.CloseEndpoints()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print ''
-    print '#################################connect2#################################'
+    print('')
+    print('#################################connect2#################################')
     try:
         devMgr.ConnectDevice(deviceId=nodeId, deviceAddr=addr)
 
-    except WeaveStack.WeaveStackException, ex:
-        print ex
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
         exit()
 
 
-    print ''
-    print '#################################close#################################'
+    print('')
+    print('#################################close#################################')
 
     try:
         devMgr.Close()
         devMgr.CloseEndpoints()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print ''
-    print '#################################set-rendezvous-linklocal#################################'
+    print('')
+    print('#################################set-rendezvous-linklocal#################################')
     try:
         devMgr.SetRendezvousLinkLocal(0)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Done."
+    print("Done.")
 
-    print '#################################set-rendezvous-address#################################'
+    print('#################################set-rendezvous-address#################################')
     try:
         devMgr.SetRendezvousAddress(addr)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Done."
+    print("Done.")
 
-    print ''
-    print '#################################set-connect-timeout#################################'
+    print('')
+    print('#################################set-connect-timeout#################################')
     timeoutMS = 1000
 
     try:
         devMgr.SetConnectTimeout(timeoutMS)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Done."
+    print("Done.")
 
-    print ''
-    print '#################################rendezvous1#################################'
+    print('')
+    print('#################################rendezvous1#################################')
     try:
         devMgr.RendezvousDevice(
                                 accessToken=options.accessToken,
@@ -779,24 +806,24 @@
                                 targetVendorId=WeaveDeviceMgr.TargetVendorId_Any,
                                 targetProductId=WeaveDeviceMgr.TargetProductId_Any,
                                 targetDeviceId=WeaveDeviceMgr.TargetDeviceId_Any)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Connected to device %X at %s" % (nodeId, addr)
+    print("Connected to device %X at %s" % (nodeId, addr))
 
-    print ''
-    print '#################################close#################################'
+    print('')
+    print('#################################close#################################')
 
     try:
         devMgr.Close()
         devMgr.CloseEndpoints()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print ''
-    print '#################################rendezvous2#################################'
+    print('')
+    print('#################################rendezvous2#################################')
     try:
         devMgr.RendezvousDevice(
                                 pairingCode=options.pairingCode,
@@ -805,147 +832,147 @@
                                 targetVendorId=WeaveDeviceMgr.TargetVendorId_Any,
                                 targetProductId=WeaveDeviceMgr.TargetProductId_Any,
                                 targetDeviceId=WeaveDeviceMgr.TargetDeviceId_Any)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Connected to device %X at %s" % (nodeId, addr)
+    print("Connected to device %X at %s" % (nodeId, addr))
 
-    print ''
-    print '#################################close#################################'
+    print('')
+    print('#################################close#################################')
 
     try:
         devMgr.Close()
         devMgr.CloseEndpoints()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print ''
-    print '#################################rendezvous3#################################'
+    print('')
+    print('#################################rendezvous3#################################')
     try:
         devMgr.RendezvousDevice(
                                 pairingCode=options.pairingCode)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Connected to device %X at %s" % (nodeId, addr)
+    print("Connected to device %X at %s" % (nodeId, addr))
 
-    print ''
-    print '#################################close#################################'
+    print('')
+    print('#################################close#################################')
 
     try:
         devMgr.Close()
         devMgr.CloseEndpoints()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print ''
-    print '#################################rendezvous4#################################'
+    print('')
+    print('#################################rendezvous4#################################')
     try:
         devMgr.RendezvousDevice()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Connected to device %X at %s" % (nodeId, addr)
+    print("Connected to device %X at %s" % (nodeId, addr))
 
-    print ''
-    print '#################################close#################################'
+    print('')
+    print('#################################close#################################')
 
     try:
         devMgr.Close()
         devMgr.CloseEndpoints()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print ''
-    print '#################################connect#################################'
+    print('')
+    print('#################################connect#################################')
     try:
         devMgr.ConnectDevice(deviceId=nodeId, deviceAddr=addr, pairingCode=options.pairingCode)
 
-    except WeaveStack.WeaveStackException, ex:
-        print ex
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
         exit()
 
-    print ''
-    print '#################################set-rendezvous-mode#################################'
+    print('')
+    print('#################################set-rendezvous-mode#################################')
     try:
         devMgr.SetRendezvousMode(10)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Set rendezvous mode complete"
+    print("Set rendezvous mode complete")
 
-    print ''
-    print '#################################arm-fail-safe#################################'
+    print('')
+    print('#################################arm-fail-safe#################################')
     failSafeToken = random.randint(0, 2**32)
 
     try:
         devMgr.ArmFailSafe(1, failSafeToken)
-    except WeaveStack.WeaveStackException, ex:
-        print ex
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
         exit()
 
-    print "Arm fail-safe complete, fail-safe token = " + str(failSafeToken)
+    print("Arm fail-safe complete, fail-safe token = " + str(failSafeToken))
 
     try:
         devMgr.ArmFailSafe(2, failSafeToken)
-    except WeaveStack.WeaveStackException, ex:
-        print ex
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
         exit()
 
-    print "Arm fail-safe complete, fail-safe token = " + str(failSafeToken)
+    print("Arm fail-safe complete, fail-safe token = " + str(failSafeToken))
 
     try:
         devMgr.ArmFailSafe(3, failSafeToken)
-    except WeaveStack.WeaveStackException, ex:
-        print ex
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
         exit()
 
-    print "Arm fail-safe complete, fail-safe token = " + str(failSafeToken)
+    print("Arm fail-safe complete, fail-safe token = " + str(failSafeToken))
 
-    print ''
-    print '#################################disarm-fail-safe#################################'
+    print('')
+    print('#################################disarm-fail-safe#################################')
     try:
         devMgr.DisarmFailSafe()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Disarm fail-safe complete"
+    print("Disarm fail-safe complete")
 
-    print ''
-    print '#################################reset-config#################################'
+    print('')
+    print('#################################reset-config#################################')
     #Reset the device's configuration. <reset-flags> is an optional hex value specifying the type of reset to be performed.
     resetFlags = 0x00FF
 
     try:
         devMgr.ResetConfig(resetFlags)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Reset config complete"
+    print("Reset config complete")
 
-    print ''
-    print '#################################set-auto-reconnect#################################'
+    print('')
+    print('#################################set-auto-reconnect#################################')
     autoReconnect = 1
 
     try:
         devMgr.SetAutoReconnect(autoReconnect)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Done."
+    print("Done.")
 
-    print ''
-    print '#################################set-log-output#################################'
+    print('')
+    print('#################################set-log-output#################################')
     category = 'detail'
     if (category == 'none'):
         category = 0
@@ -958,41 +985,41 @@
 
     try:
         devMgr.SetLogFilter(category)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Done."
+    print("Done.")
 
     RunWdmClientTest()
 
-    print ''
-    print '#################################scan-network#################################'
+    print('')
+    print('#################################scan-network#################################')
     try:
         networkType = WeaveDeviceMgr.ParseNetworkType("wifi")
         scanResult = devMgr.ScanNetworks(networkType)
-    except WeaveStack.WeaveStackException, ex:
-        print ex
-    print "ScanNetworks complete, %d network(s) found" % (len(scanResult))
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
+    print("ScanNetworks complete, %d network(s) found" % (len(scanResult)))
     i = 1
     for net in scanResult:
-        print "  Network %d" % (i)
+        print("  Network %d" % (i))
         net.Print("    ")
         i = i + 1
     try:
         networkType = WeaveDeviceMgr.ParseNetworkType("thread")
         scanResult = devMgr.ScanNetworks(networkType)
-    except WeaveStack.WeaveStackException, ex:
-        print ex
-    print "ScanNetworks complete, %d network(s) found" % (len(scanResult))
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
+    print("ScanNetworks complete, %d network(s) found" % (len(scanResult)))
     i = 1
     for net in scanResult:
-        print "  Network %d" % (i)
+        print("  Network %d" % (i))
         net.Print("    ")
         i = i + 1
 
-    print ''
-    print  '#################################add-network#################################'
+    print('')
+    print('#################################add-network#################################')
     networkInfo = WeaveDeviceMgr.NetworkInfo(
     networkType = WeaveDeviceMgr.NetworkType_WiFi,
     wifiSSID = "Wireless-1",
@@ -1002,16 +1029,16 @@
 
     try:
         addResult = devMgr.AddNetwork(networkInfo)
-    except WeaveStack.WeaveStackException, ex:
-        print ex
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
         exit()
 
     lastNetworkId = addResult
 
-    print "Add wifi network complete (network id = " + str(addResult) + ")"
+    print("Add wifi network complete (network id = " + str(addResult) + ")")
 
-    print ''
-    print  '#################################update-network#################################'
+    print('')
+    print('#################################update-network#################################')
 
     # networkInfo = WeaveDeviceMgr.NetworkInfo(networkId=lastNetworkId)
 
@@ -1025,64 +1052,64 @@
 
     try:
         devMgr.UpdateNetwork(networkInfo)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Update network complete"
+    print("Update network complete")
 
-    print ''
-    print  '#################################disable-network#################################'
+    print('')
+    print('#################################disable-network#################################')
 
     try:
         devMgr.DisableNetwork(lastNetworkId)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
 
-    print "Disable network complete"
+    print("Disable network complete")
 
-    print ''
-    print  '#################################enable-network#################################'
+    print('')
+    print('#################################enable-network#################################')
 
     try:
         devMgr.EnableNetwork(lastNetworkId)
-    except WeaveStack.WeaveStackException, ex:
-        print ex
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
         exit()
 
-    print "Enable network complete"
+    print("Enable network complete")
 
-    print ''
-    print  '#################################test-network#################################'
+    print('')
+    print('#################################test-network#################################')
 
     try:
         devMgr.TestNetworkConnectivity(lastNetworkId)
-    except WeaveStack.WeaveStackException, ex:
-        print ex
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
         exit()
 
-    print "Network test complete"
+    print("Network test complete")
 
-    print ''
-    print  '#################################get-networks-without-credentials#################################'
+    print('')
+    print('#################################get-networks-without-credentials#################################')
 
     try:
         # Send a GetNetworks without asking for credentials
         flags = 0
         getResult = devMgr.GetNetworks(flags)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Get networks complete, %d network(s) returned" % (len(getResult))
+    print("Get networks complete, %d network(s) returned" % (len(getResult)))
     i = 1
     for net in getResult:
-        print "  Network %d" % (i)
+        print("  Network %d" % (i))
         net.Print("    ")
         i = i + 1
 
-    print ''
-    print  '#################################get-networks-with-credentials#################################'
+    print('')
+    print('#################################get-networks-with-credentials#################################')
 
     try:
         # Send a GetNetworks asking for credentials: this is allowed only if the
@@ -1090,239 +1117,241 @@
         kGetNetwork_IncludeCredentials = 1
         flags = kGetNetwork_IncludeCredentials
         getResult = devMgr.GetNetworks(flags)
-    except WeaveStack.WeaveStackException, ex:
-        print "expected Device Error: [ Common(00000000):20 ] Access denied"
-        print "caught " + str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print("expected Device Error: [ Common(00000000):20 ] Access denied")
+        print("caught " + str(ex))
         if ex.profileId != 0 or ex.statusCode != 20:
             exit()
 
-    print ''
-    print  '#################################remove-network#################################'
+    print('')
+    print('#################################remove-network#################################')
 
     try:
         devMgr.RemoveNetwork(lastNetworkId)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Remove network complete"
+    print("Remove network complete")
 
-    print ''
-    print  '#################################create-fabric#################################'
+    print('')
+    print('#################################create-fabric#################################')
 
     try:
         devMgr.CreateFabric()
-    except WeaveStack.WeaveStackException, ex:
-         print 'Already member of fabric'
+    except WeaveStack.WeaveStackException as ex:
+         print('Already member of fabric')
 
-    print "Create fabric complete"
+    print("Create fabric complete")
 
-    print ''
-    print  '#################################get-fabric-configure#################################'
+    print('')
+    print('#################################get-fabric-configure#################################')
 
     try:
         fabricConfig = devMgr.GetFabricConfig()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Get fabric config complete"
-    print "Fabric configuration: " + base64.b64encode(buffer(fabricConfig))
+    print("Get fabric config complete")
+    print("Fabric configuration: ")
+    print(fabricConfig)
 
-    print ''
-    print  '#################################leave-fabric#################################'
+    print('')
+    print('#################################leave-fabric#################################')
 
     try:
         devMgr.LeaveFabric()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Leave fabric complete"
+    print("Leave fabric complete")
 
-    print ''
-    print '#################################join-existing-fabric#################################'
+    print('')
+    print('#################################join-existing-fabric#################################')
 
     try:
         devMgr.JoinExistingFabric(fabricConfig)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Join existing fabric complete"
+    print("Join existing fabric complete")
 
-    print ''
-    print '#################################identify#################################'
+    print('')
+    print('#################################identify#################################')
 
     try:
         deviceDesc = devMgr.IdentifyDevice()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Identify device complete"
+    print("Identify device complete")
     deviceDesc.Print("  ")
 
-    print ''
-    print '#################################get-last-network-provisioning-result#################################'
+    print('')
+    print('#################################get-last-network-provisioning-result#################################')
 
     try:
         devMgr.GetLastNetworkProvisioningResult()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print ''
-    print  '#################################get-wireless-reg-config#################################'
+    print('')
+    print('#################################get-wireless-reg-config#################################')
 
     try:
         getResult = devMgr.GetWirelessRegulatoryConfig()
-    except WeaveDeviceMgr.DeviceManagerException, ex:
-        print str(ex)
+    except WeaveDeviceMgr.DeviceManagerException as ex:
+        print(str(ex))
         exit()
 
-    print "GetWirelessRegulatoryConfig complete"
+    print("GetWirelessRegulatoryConfig complete")
     getResult.Print("  ")
 
-    print ''
-    print  '#################################set-wireless-reg-config#################################'
+    print('')
+    print('#################################set-wireless-reg-config#################################')
 
     try:
         devMgr.SetWirelessRegulatoryConfig(WeaveDeviceMgr.WirelessRegConfig(regDomain="US"))
-    except WeaveDeviceMgr.DeviceManagerException, ex:
-        print str(ex)
+    except WeaveDeviceMgr.DeviceManagerException as ex:
+        print(str(ex))
         exit()
 
-    print "SetWirelessRegulatoryConfig complete"
+    print("SetWirelessRegulatoryConfig complete")
 
-    print ''
-    print '#################################ping#################################'
+    print('')
+    print('#################################ping#################################')
 
     try:
         devMgr.Ping()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
-    print "Ping complete"
+    print("Ping complete")
 
-    print ''
-    print '#################################register-service#################################'
+    print('')
+    print('#################################register-service#################################')
     try:
         devMgr.RegisterServicePairAccount(0x18B4300100000001, '21245530', base64.b64decode(DUMMY_SERVICE_CONFIG), DUMMY_PAIRING_TOKEN, DUMMY_INIT_DATA)
-    except WeaveStack.WeaveStackException, ex:
-        print ex
+    except WeaveStack.WeaveStackException as ex:
+        print(ex)
         exit()
 
-    print "Register service complete"
+    print("Register service complete")
 
-    print ''
-    print '#################################update-service#################################'
+    print('')
+    print('#################################update-service#################################')
     try:
         devMgr.UpdateService(0x18B4300100000001, base64.b64decode(DUMMY_SERVICE_CONFIG))
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Update service complete"
+    print("Update service complete")
 
-    print ''
-    print '#################################unregister-service#################################'
+    print('')
+    print('#################################unregister-service#################################')
 
     try:
         devMgr.UnregisterService(0x18B4300100000001)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Unregister service complete"
-    print ''
-    print '#################################close#################################'
+    print("Unregister service complete")
+    print('')
+    print('#################################close#################################')
 
     try:
         devMgr.Close()
         devMgr.CloseEndpoints()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
-    print ''
-    print '#################################reconnect#################################'
+    print('')
+    print('#################################reconnect#################################')
 
     try:
         devMgr.ReconnectDevice()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print ''
-    print '#################################enable-connection-monitor#################################'
+    print('')
+    print('#################################enable-connection-monitor#################################')
     interval = 5000
     timeout = 1000
     try:
         devMgr.EnableConnectionMonitor(interval, timeout)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Connection monitor enabled"
+    print("Connection monitor enabled")
 
-    print ''
-    print '#################################disable-connection-monitor#################################'
+    print('')
+    print('#################################disable-connection-monitor#################################')
     try:
         devMgr.DisableConnectionMonitor()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Connection monitor disabled"
+    print("Connection monitor disabled")
 
-    print ''
-    print '#################################start-system-test#################################'
+    print('')
+    print('#################################start-system-test#################################')
     try:
         devMgr.StartSystemTest(WeaveDeviceMgr.SystemTest_ProductList["thermostat"], 1)
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Start system test complete"
-    print ''
-    print '#################################stop-system-test#################################'
+    print("Start system test complete")
+    print('')
+    print('#################################stop-system-test#################################')
     try:
         devMgr.StopSystemTest()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Stop system test complete"
+    print("Stop system test complete")
 
-    print ''
-    print '#################################pair-token#################################'
+    print('')
+    print('#################################pair-token#################################')
     try:
         tokenPairingBundle = devMgr.PairToken('Test')
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Pair token complete"
-    print "TokenPairingBundle: " + base64.b64encode(buffer(tokenPairingBundle))
+    print("Pair token complete")
+    print("TokenPairingBundle: ")
+    print(tokenPairingBundle)
 
-    print ''
-    print '#################################unpair-token#################################'
+    print('')
+    print('#################################unpair-token#################################')
     try:
         devMgr.UnpairToken()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
 
-    print "Unpair token complete"
+    print("Unpair token complete")
 
 
-    print ''
-    print '#################################close#################################'
+    print('')
+    print('#################################close#################################')
 
     try:
         devMgr.Close()
         devMgr.CloseEndpoints()
-    except WeaveStack.WeaveStackException, ex:
-        print str(ex)
+    except WeaveStack.WeaveStackException as ex:
+        print(str(ex))
         exit()
-    print "Shutdown complete"
+    print("Shutdown complete")
diff --git a/src/test-apps/happy/lib/WeaveFabricAdd.py b/src/test-apps/happy/lib/WeaveFabricAdd.py
index 398730a..3b99b98 100644
--- a/src/test-apps/happy/lib/WeaveFabricAdd.py
+++ b/src/test-apps/happy/lib/WeaveFabricAdd.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2015-2017 Nest Labs, Inc.
@@ -22,6 +22,7 @@
 #       Implements WeaveFabricAdd class that creates Weave Fabric.
 #
 
+from __future__ import absolute_import
 import os
 import sys
 import uuid
diff --git a/src/test-apps/happy/lib/WeaveFabricDelete.py b/src/test-apps/happy/lib/WeaveFabricDelete.py
index 4b55909..f91d28f 100644
--- a/src/test-apps/happy/lib/WeaveFabricDelete.py
+++ b/src/test-apps/happy/lib/WeaveFabricDelete.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2015-2017 Nest Labs, Inc.
@@ -22,6 +22,7 @@
 #       Implements WeaveFabricDelete class that removes Weave Fabric.
 #
 
+from __future__ import absolute_import
 import os
 import sys
 
diff --git a/src/test-apps/happy/lib/WeaveNetworkGateway.py b/src/test-apps/happy/lib/WeaveNetworkGateway.py
index b69fa08..4fa2b2a 100644
--- a/src/test-apps/happy/lib/WeaveNetworkGateway.py
+++ b/src/test-apps/happy/lib/WeaveNetworkGateway.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2016-2017 Nest Labs, Inc.
@@ -25,6 +25,7 @@
 #       bridge that acts like a hub.
 #
 
+from __future__ import absolute_import
 import os
 import sys
 
diff --git a/src/test-apps/happy/lib/WeaveNodeConfigure.py b/src/test-apps/happy/lib/WeaveNodeConfigure.py
index 29dc12d..9949936 100644
--- a/src/test-apps/happy/lib/WeaveNodeConfigure.py
+++ b/src/test-apps/happy/lib/WeaveNodeConfigure.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2019 Google, LLC.
@@ -24,6 +24,8 @@
 #       Weave parameters for a Happy node.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import glob
 import re
@@ -39,6 +41,7 @@
 from Weave import Weave
 from WeaveState import WeaveState
 import WeaveCerts
+from six.moves import range
 
 options = {}
 options['quiet'] = True
@@ -152,7 +155,7 @@
         WeaveState. If none is found, generates a random weave_node_id.
         """
         ids_in_use = self.weave_state.getWeaveNodeIds()
-        ids_with_certs = self.weave_device_certs.keys()
+        ids_with_certs = list(self.weave_device_certs.keys())
         available_ids = list(set(ids_with_certs) - set(ids_in_use))
 
         if available_ids:
@@ -392,62 +395,62 @@
 
 if __name__ == '__main__':
 
-    print "\nTEST01: no node_name, configure all nodes"
+    print("\nTEST01: no node_name, configure all nodes")
     opts = option()
     wnc = WeaveNodeConfigure(opts)
     wnc.run()
-    print json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4)
+    print(json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4))
 
-    print "\nTEST02: node_name: BorderRouter. Random weave_node_id assigned."
+    print("\nTEST02: node_name: BorderRouter. Random weave_node_id assigned.")
     opts = option()
     opts['node_name'] = 'BorderRouter'
     wnc = WeaveNodeConfigure(opts)
     wnc.run()
-    print json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4)
+    print(json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4))
 
-    print "\nTEST03: node_name: BorderRouter. weave_node_id: 18B4300000000003. certs: None"
+    print("\nTEST03: node_name: BorderRouter. weave_node_id: 18B4300000000003. certs: None")
     opts = option()
     opts['node_name'] = 'BorderRouter'
     opts['weave_node_id'] = '18B4300000000003'
     wnc = WeaveNodeConfigure(opts)
     wnc.run()
-    print json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4)
+    print(json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4))
 
-    print "\nTEST04: node_name: ThreadNode. weave_node_id: 18B430000000111. certs don't exist."
+    print("\nTEST04: node_name: ThreadNode. weave_node_id: 18B430000000111. certs don't exist.")
     opts = option()
     opts['node_name'] = 'ThreadNode'
     opts['weave_node_id'] = '18B4300000000111'
     wnc = WeaveNodeConfigure(opts)
     wnc.run()
-    print json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4)
+    print(json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4))
 
-    print "\nTEST05: node_name: BorderRouter, delete=True"
+    print("\nTEST05: node_name: BorderRouter, delete=True")
     opts = option()
     opts['node_name'] = 'BorderRouter'
     opts['delete'] = True
     wnc = WeaveNodeConfigure(opts)
     wnc.run()
-    print json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4)
+    print(json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4))
 
-    print "\nTEST06: delete=True, deletes all nodes"
+    print("\nTEST06: delete=True, deletes all nodes")
     opts = option()
     opts['delete'] = True
     wnc = WeaveNodeConfigure(opts)
     wnc.run()
-    print json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4)
+    print(json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4))
 
-    print "\nTEST07: node_name: BorderRouter, customized_eui64=18-B4-30-00-00-00-00-05"
+    print("\nTEST07: node_name: BorderRouter, customized_eui64=18-B4-30-00-00-00-00-05")
     opts = option()
     opts['node_name'] = 'BorderRouter'
     opts['customized_eui64'] = '18-B4-30-00-00-00-00-05'
     wnc = WeaveNodeConfigure(opts)
     wnc.run()
-    print json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4)
+    print(json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4))
 
-    print "\nTEST08: node_name: BorderRouter, customized_eui64=18-B4-30-00-AA-00-00-05"
+    print("\nTEST08: node_name: BorderRouter, customized_eui64=18-B4-30-00-AA-00-00-05")
     opts = option()
     opts['node_name'] = 'BorderRouter'
     opts['customized_eui64'] = '18-B4-30-00-AA-00-00-05'
     wnc = WeaveNodeConfigure(opts)
     wnc.run()
-    print json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4)
+    print(json.dumps(wnc.weave_state.getWeaveNodeRecord(), indent=4))
diff --git a/src/test-apps/happy/lib/WeaveState.py b/src/test-apps/happy/lib/WeaveState.py
index cbae320..1e6a365 100644
--- a/src/test-apps/happy/lib/WeaveState.py
+++ b/src/test-apps/happy/lib/WeaveState.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2019 Google, LLC.
@@ -24,9 +24,12 @@
 #       parts of state setup that relate to Weave plugin.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import json
 from happy.State import State
 from happy.utils.IP import IP
+from six.moves import range
 
 options = {}
 options["quiet"] = False
@@ -59,74 +62,74 @@
 
     def getWeaveRecord(self, state=None):
         state = self.getState(state)
-        if "weave" not in state.keys():
+        if "weave" not in list(state.keys()):
             state["weave"] = {}
         return state["weave"]
 
     def getFabricRecord(self, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "fabric" not in weave_record.keys():
+        if "fabric" not in list(weave_record.keys()):
             weave_record["fabric"] = {}
         return weave_record["fabric"]
 
     def getWeaveNodeRecord(self, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "node" not in weave_record.keys():
+        if "node" not in list(weave_record.keys()):
             weave_record["node"] = {}
         return weave_record["node"]
 
     def getTunnelRecord(self, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "tunnel" not in weave_record.keys():
+        if "tunnel" not in list(weave_record.keys()):
             weave_record["tunnel"] = {}
         return weave_record["tunnel"]
 
     def getWeaveNetworks(self, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "network" not in weave_record.keys():
+        if "network" not in list(weave_record.keys()):
             weave_record["network"] = {}
         return weave_record["network"]
 
     def getFabricId(self, state=None):
         fabric_record = self.getFabricRecord(state)
-        if "id" not in fabric_record.keys():
+        if "id" not in list(fabric_record.keys()):
             return None
         fabid = fabric_record["id"]
         return "%x" % (int(fabid, 16))
 
     def getTunnelGatewayNodeId(self, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "tunnel" not in weave_record.keys():
+        if "tunnel" not in list(weave_record.keys()):
             return None
-        if "gateway" not in weave_record["tunnel"].keys():
+        if "gateway" not in list(weave_record["tunnel"].keys()):
             return None
         return weave_record["tunnel"]["gateway"]
 
     def getTunnelServiceNodeId(self, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "tunnel" not in weave_record.keys():
+        if "tunnel" not in list(weave_record.keys()):
             return None
-        if "service" not in weave_record["tunnel"].keys():
+        if "service" not in list(weave_record["tunnel"].keys()):
             return None
         return weave_record["tunnel"]["service"]
 
     def getTunnelServiceDir(self, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "tunnel" not in weave_record.keys():
+        if "tunnel" not in list(weave_record.keys()):
             return None
-        if "service_dir" not in weave_record["tunnel"].keys():
+        if "service_dir" not in list(weave_record["tunnel"].keys()):
             return None
         return weave_record["tunnel"]["service_dir"]
 
     def getFabricGlobalPrefix(self, state=None):
         fabric_record = self.getFabricRecord(state)
-        if "global_prefix" not in fabric_record.keys():
+        if "global_prefix" not in list(fabric_record.keys()):
             return None
         return fabric_record["global_prefix"]
 
     def getWeaveNodes(self, state=None):
         nodes_record = self.getWeaveNodeRecord(state)
-        return nodes_record.keys()
+        return list(nodes_record.keys())
 
     def getWeaveNodeIds(self, state=None):
         nodes_record = self.getWeaveNodeRecord(state)
@@ -134,25 +137,25 @@
 
     def getNodeWeaveRecord(self, node_id=None, state=None):
         nodes_record = self.getWeaveNodeRecord(state)
-        if node_id not in nodes_record.keys():
+        if node_id not in list(nodes_record.keys()):
             return {}
         return nodes_record[node_id]
 
     def getWeaveNodeID(self, node_id=None, state=None):
         node_record = self.getNodeWeaveRecord(node_id, state)
-        if "weave_node_id" not in node_record.keys():
+        if "weave_node_id" not in list(node_record.keys()):
             return None
         return node_record["weave_node_id"]
 
     def getWeaveNodeIID(self, node_id=None, state=None):
         node_record = self.getNodeWeaveRecord(node_id, state)
-        if "iid" not in node_record.keys():
+        if "iid" not in list(node_record.keys()):
             return None
         return node_record["iid"]
 
     def getWeaveNodeEUI64(self, node_id=None, state=None):
         node_record = self.getNodeWeaveRecord(node_id, state)
-        if "eui64" not in node_record.keys():
+        if "eui64" not in list(node_record.keys()):
             return None
         return node_record["eui64"]
 
@@ -170,23 +173,23 @@
 
     def getWeaveNetworkIds(self, state=None):
         networks_record = self.getWeaveNetworks(state)
-        return networks_record.keys()
+        return list(networks_record.keys())
 
     def getWeaveNetworkRecord(self, network_id=None, state=None):
         networks_record = self.getWeaveNetworks(state)
-        if network_id not in networks_record.keys():
+        if network_id not in list(networks_record.keys()):
             return {}
         return networks_record[network_id]
 
     def getWeaveNetworkGatewayIds(self, network_id=None, state=None):
         network_record = self.getWeaveNetworkRecord(network_id, state)
-        if "gateway" not in network_record.keys():
+        if "gateway" not in list(network_record.keys()):
             return []
-        return network_record["gateway"].keys()
+        return list(network_record["gateway"].keys())
 
     def getServiceWeaveID(self, service, node_id=None, state=None):
         endpoints = self.getServiceEndpoints()
-        if service not in endpoints.keys():
+        if service not in list(endpoints.keys()):
             return None
         return endpoints[service]["id"]
 
@@ -331,7 +334,7 @@
 
     def getSerialNum(self, node_id=None, state=None):
         node_record = self.getNodeWeaveRecord(node_id, state)
-        if "serial_num" not in node_record.keys():
+        if "serial_num" not in list(node_record.keys()):
             return None
         return node_record["serial_num"]
 
@@ -357,31 +360,31 @@
 
     def removeTunnel(self, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "tunnel" in weave_record.keys():
+        if "tunnel" in list(weave_record.keys()):
             del weave_record["tunnel"]
 
     def removeFabric(self, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "fabric" in weave_record.keys():
+        if "fabric" in list(weave_record.keys()):
             del weave_record["fabric"]
 
     def removeWeaveNode(self, node, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "node" in weave_record.keys():
+        if "node" in list(weave_record.keys()):
             node_record = weave_record['node']
-            if node in node_record.keys():
+            if node in list(node_record.keys()):
                 del node_record[node]
                 if len(node_record) == 0:
                     self.removeWeaveNodes(state)
 
     def removeWeaveNodes(self, state=None):
         weave_record = self.getWeaveRecord(state)
-        if "node" in weave_record.keys():
+        if "node" in list(weave_record.keys()):
             del weave_record["node"]
 
     def removeWeaveGateway(self, network_id, state=None):
         network_record = self.getWeaveNetworkRecord(network_id, state)
-        if "gateway" in network_record.keys():
+        if "gateway" in list(network_record.keys()):
             del network_record["gateway"]
 
     def __str__(self):
@@ -398,20 +401,20 @@
         if self.quiet:
             return
 
-        print "State Name: weave"
-        print
+        print("State Name: weave")
+        print()
 
         weave_nodes = self.getWeaveNodeRecord()
         node_format = "%-10s%15s%20s%16s"
-        print node_format % ("NODES", "Name", "Weave Node Id", "Pairing Code")
+        print(node_format % ("NODES", "Name", "Weave Node Id", "Pairing Code"))
 
         for node in sorted(weave_nodes.keys()):
             node_record = weave_nodes[node]
-            print node_format % ("", node, node_record.get('weave_node_id', 'None'), node_record.get('pairing_code', 'None'))
-        print
+            print(node_format % ("", node, node_record.get('weave_node_id', 'None'), node_record.get('pairing_code', 'None')))
+        print()
 
         fabric_record = self.getFabricRecord()
         fabric_format = "%-10s%15s%24s"
-        print fabric_format % ("FABRIC", "Fabric Id", "Global Prefix")
-        print fabric_format % ("", fabric_record.get('id', ""), fabric_record.get('global_prefix', ""))
-        print
+        print(fabric_format % ("FABRIC", "Fabric Id", "Global Prefix"))
+        print(fabric_format % ("", fabric_record.get('id', ""), fabric_record.get('global_prefix', "")))
+        print()
diff --git a/src/test-apps/happy/lib/WeaveStateLoad.py b/src/test-apps/happy/lib/WeaveStateLoad.py
index c862468..f8250d4 100644
--- a/src/test-apps/happy/lib/WeaveStateLoad.py
+++ b/src/test-apps/happy/lib/WeaveStateLoad.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2016-2017 Nest Labs, Inc.
@@ -23,6 +23,7 @@
 #       together with Weave fabric configuration.
 #
 
+from __future__ import absolute_import
 import json
 import os
 import sys
diff --git a/src/test-apps/happy/lib/WeaveStateUnload.py b/src/test-apps/happy/lib/WeaveStateUnload.py
index 7ffba18..8aa99bd 100644
--- a/src/test-apps/happy/lib/WeaveStateUnload.py
+++ b/src/test-apps/happy/lib/WeaveStateUnload.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2016-2017 Nest Labs, Inc.
@@ -23,6 +23,7 @@
 #       together with Weave fabric configuration.
 #
 
+from __future__ import absolute_import
 import json
 import os
 import sys
diff --git a/src/test-apps/happy/lib/WeaveTest.py b/src/test-apps/happy/lib/WeaveTest.py
index 3ff3c06..cc34749 100644
--- a/src/test-apps/happy/lib/WeaveTest.py
+++ b/src/test-apps/happy/lib/WeaveTest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,7 @@
 #       Implements WeaveTest class that provides generic Weave testing features.
 #
 
+from __future__ import absolute_import
 import os
 import random
 import sys
@@ -38,6 +39,7 @@
 import happy.HappyProcessStrace
 import happy.HappyProcessWait
 import happy.State
+from six.moves import range
 
 gready_to_service_events_str = "Weave Node ready to service events"
 
@@ -45,7 +47,7 @@
     def __init__(self):
         self.ready_to_service_events_str = gready_to_service_events_str
         Weave.__init__(self)
-        if "JITTER_DISTRIBUTION_CURVE" in os.environ.keys():
+        if "JITTER_DISTRIBUTION_CURVE" in list(os.environ.keys()):
             self.jitter_distribution_curve = int(os.environ["JITTER_DISTRIBUTION_CURVE"])
         else:
             self.jitter_distribution_curve = None
@@ -120,7 +122,7 @@
                 delayTimeSec = fibonacci_numbers[1]
             else:
                 jitter_distribution_curve -= 2
-                for i in xrange(jitter_distribution_curve):
+                for i in range(jitter_distribution_curve):
                     fibonacci_numbers.append(fibonacci_numbers[i+1]+fibonacci_numbers[i])
                 delayTimeSec = random.choice(fibonacci_numbers)
             self.logger.debug("Test Delay %d seconds" % delayTimeSec)
diff --git a/src/test-apps/happy/lib/WeaveTopologyMgr.py b/src/test-apps/happy/lib/WeaveTopologyMgr.py
index 9d02e92..adc7206 100644
--- a/src/test-apps/happy/lib/WeaveTopologyMgr.py
+++ b/src/test-apps/happy/lib/WeaveTopologyMgr.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -22,6 +22,7 @@
 #       Implements WeaveTopologyMgr class that provides API to create weave topology
 #
 
+from __future__ import absolute_import
 import WeaveFabricAdd
 import WeaveFabricDelete
 import WeaveNetworkGateway
diff --git a/src/test-apps/happy/lib/WeaveUtilities.py b/src/test-apps/happy/lib/WeaveUtilities.py
index 26b7c6d..b019283 100644
--- a/src/test-apps/happy/lib/WeaveUtilities.py
+++ b/src/test-apps/happy/lib/WeaveUtilities.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       detection, fault-injection, etc)
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import sys
 import re
 import pprint
@@ -36,6 +38,7 @@
 
 
 from happy.Utils import *
+from six.moves import range
 
 def scan_for_leaks_and_parser_errors(test_output):
     parser_error = False
@@ -122,14 +125,14 @@
             missing.append(key)
     if missing:
         msg = "The happy sequence did not cover " + str(missing) + " on " + node_name
-        print hred(msg)
+        print(hred(msg))
         raise ValueError(msg)
     return True
 
 
 def test_parse_fault_injection_counters():
 
-    print "test_parse_fault_injection_counters"
+    print("test_parse_fault_injection_counters")
 
     test_output = '''
         WDMClient_NumCancelInUse:       0
@@ -162,14 +165,14 @@
               counters["WeaveSys_TimeoutImmediate"] == str(0)
 
     if result:
-        print "passed"
+        print("passed")
     else:
-        print "failed"
+        print("failed")
 
 
 def test_scan_for_resource_leak():
 
-    print "test_scan_for_resource_leak"
+    print("test_scan_for_resource_leak")
 
     test_output = '''
     some log line
@@ -199,7 +202,7 @@
     result = "failed"
     if leak_detected:
         result = "passed"
-    print "Test 1: " + result
+    print("Test 1: " + result)
 
     test_output = '''
     some log line
@@ -211,7 +214,7 @@
     if scan_result == None:
         result = "passed"
 
-    print "Test 2: " + result
+    print("Test 2: " + result)
 
     test_output = '''
     some log line
@@ -224,10 +227,10 @@
     if leak_detected == False:
         result = "passed"
 
-    print "Test 3: " + result
+    print("Test 3: " + result)
 
 def test_scan_for_leaks_and_parser_errors():
-    print "test_scan_for_leaks_and_parser_errors"
+    print("test_scan_for_leaks_and_parser_errors")
 
     test_output = '''
     some log line
@@ -256,7 +259,7 @@
     result = "failed"
     if leak_detected and not parser_error:
         result = "passed"
-    print result
+    print(result)
 
 
 class FaultInjectionOptions:
@@ -289,27 +292,27 @@
         return: a copy of the list of options minus the fault-injection options
         """
         ret_opts = []
-	for o, a in opts:
-	    if o in ("--faultid"):
-		self.configuration["faultid"] = a
-	    elif o in ("--faultskip"):
-		self.configuration["faultskip"] = int(a)
-	    elif o in ("--failonly"):
-		if a in self.nodes:
-		    self.configuration["failonly"] = a
-		else:
-		    print self.help_string
-		    sys.exit(1)
-            elif o in ("--group"):
-                num = int(a)
-                if num <= 0:
-                    print self.help_string
+        for o, a in opts:
+            if o in ("--faultid"):
+                self.configuration["faultid"] = a
+            elif o in ("--faultskip"):
+                self.configuration["faultskip"] = int(a)
+            elif o in ("--failonly"):
+                if a in self.nodes:
+                    self.configuration["failonly"] = a
+                else:
+                    print(self.help_string)
                     sys.exit(1)
-                self.configuration["group"] = num
+            elif o in ("--group"):
+                    num = int(a)
+                    if num <= 0:
+                        print(self.help_string)
+                        sys.exit(1)
+                    self.configuration["group"] = num
             elif o in ("--numgroups"):
                 num = int(a)
                 if num < 0:
-                    print self.help_string
+                    print(self.help_string)
                     sys.exit(1)
                 self.configuration["numgroups"] = num
             elif o in ("--nofaults"):
@@ -318,11 +321,11 @@
                 ret_opts.append((o, a))
 
         if (self.configuration["group"] != None) != (self.configuration["numgroups"] != None):
-            print self.help_string
+            print(self.help_string)
             sys.exit(1)
 
         if (self.configuration["group"] and self.configuration["group"] > self.configuration["numgroups"]):
-            print self.help_string
+            print(self.help_string)
             sys.exit(1)
 
         return ret_opts
@@ -391,7 +394,7 @@
             fault_counters = parse_fault_injection_counters(outputlog)
             fault_instance_parameters = self.parse_fault_instance_parameters(outputlog)
 
-            print node + ' fault counters: '
+            print(node + ' fault counters: ')
             pprint.pprint(fault_counters)
 
             if fault_ids[0] == None:
@@ -426,18 +429,18 @@
 
 
     def __get_skip_range(self, fault_counter_value):
-	skip_range = range(fault_counter_value)
-	if self.configuration['faultskip'] is not None:
-	    skip_range = [ self.configuration['faultskip'] ]
+        skip_range = list(range(fault_counter_value))
+        if self.configuration['faultskip'] is not None:
+            skip_range = [ self.configuration['faultskip'] ]
 
-	return skip_range
+        return skip_range
 
 def cleanup_after_exception():
-    print "Deleting Happy state.."
+    print("Deleting Happy state..")
     opts = happy.HappyStateDelete.option()
     state_delete = happy.HappyStateDelete.HappyStateDelete(opts)
     state_delete.run()
-    print "Happy state deleted."
+    print("Happy state deleted.")
 
 
 def run_unittest():
@@ -467,13 +470,13 @@
         unittest.main()
 
     except KeyboardInterrupt:
-        print "\n\nWeaveUtilities.run_unittest caught KeyboardInterrupt"
+        print("\n\nWeaveUtilities.run_unittest caught KeyboardInterrupt")
         cleanup_after_exception()
         raise
 
     except SystemExit as e:
         if e.args[0] not in [0, False]:
-            print "\n\nWeaveUtilities.run_unittest caught some kind of test error or failure"
+            print("\n\nWeaveUtilities.run_unittest caught some kind of test error or failure")
             cleanup_after_exception()
         raise e
     finally:
diff --git a/src/test-apps/happy/test-templates/ServiceAccountManager.py b/src/test-apps/happy/test-templates/ServiceAccountManager.py
index 540fd99..f63c46b 100644
--- a/src/test-apps/happy/test-templates/ServiceAccountManager.py
+++ b/src/test-apps/happy/test-templates/ServiceAccountManager.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #    Copyright (c) 2020 Google LLC.
 #    Copyright (c) 2015-2017 Nest Labs, Inc.
@@ -26,6 +26,7 @@
 
 from __future__ import print_function
 
+from __future__ import absolute_import
 import future
 
 import json
@@ -98,7 +99,7 @@
         for response in stub.Observe(request, 999999, self._auth_metadata):
             for resource_meta in response.resource_metas:
                 if 'USER' in resource_meta.resource_id:
-                    return resource_meta.resource_id.encode('utf-8')
+                    return resource_meta.resource_id
             if not response.initial_resource_metas_continue:
                 break
 
@@ -257,7 +258,7 @@
         self.__pre_check()
 
         self.cmd = ' --account-id %s --pairing-token %s --service-config %s --init-data \'%s\'' % (self.accountid, self.sessionJSON[
-                                                                                                   'weave']['pairing_token'], self.sessionJSON['weave']['service_config'], json.dumps(self.initial_data).encode("UTF-8"))
+                                                                                                   'weave']['pairing_token'], self.sessionJSON['weave']['service_config'], json.dumps(self.initial_data))
 
         print("Weave Access Token:")
 
diff --git a/src/test-apps/happy/test-templates/WeaveBDX.py b/src/test-apps/happy/test-templates/WeaveBDX.py
index 9ad5d8c..83cd157 100644
--- a/src/test-apps/happy/test-templates/WeaveBDX.py
+++ b/src/test-apps/happy/test-templates/WeaveBDX.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeaveBDX class that tests Weave BDX among Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -421,25 +423,25 @@
 
         if self.quiet == False:
             if self.download:
-                print "weave-bdx from server v%s %s (%s) to client v%s %s (%s) : " % \
+                print("weave-bdx from server v%s %s (%s) to client v%s %s (%s) : " % \
                     (self.server_version, self.server_node_id, self.server_ip,
-                     self.client_version, self.client_node_id, self.client_ip)
+                     self.client_version, self.client_node_id, self.client_ip))
                 if transfer_done:
-                    print hgreen("downloaded")
+                    print(hgreen("downloaded"))
                 else:
-                    print hred("not downloaded")
+                    print(hred("not downloaded"))
             else:
-                print "weave-bdx from client %s (%s) to server %s (%s) : " % \
+                print("weave-bdx from client %s (%s) to server %s (%s) : " % \
                     (self.client_node_id, self.client_ip,
-                    self.server_node_id, self.server_ip)
+                    self.server_node_id, self.server_ip))
                 if transfer_done:
-                    print hgreen("uploaded")
+                    print(hgreen("uploaded"))
                 else:
-                    print hred("not uploaded")
+                    print(hred("not uploaded"))
             if leak_detected:
-                print hred("resource leak detected in the client's ouput")
+                print(hred("resource leak detected in the client's ouput"))
             if parser_error:
-                print hred("parser error in the client's output")
+                print(hred("parser error in the client's output"))
 
 
         pass_test = transfer_done and not leak_detected and not parser_error
@@ -449,9 +451,9 @@
             parser_error, leak_detected = WeaveUtilities.scan_for_leaks_and_parser_errors(server_output)
             if self.quiet == False:
                 if leak_detected:
-                    print hred("resource leak detected in the server's ouput")
+                    print(hred("resource leak detected in the server's ouput"))
                 if parser_error:
-                    print hred("parser error in the server's output")
+                    print(hred("parser error in the server's output"))
 
         pass_test = pass_test and not parser_error and not leak_detected
 
diff --git a/src/test-apps/happy/test-templates/WeaveBle.py b/src/test-apps/happy/test-templates/WeaveBle.py
index 5baa56e..dfb8641 100755
--- a/src/test-apps/happy/test-templates/WeaveBle.py
+++ b/src/test-apps/happy/test-templates/WeaveBle.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeaveBle class that tests Weave Echo among Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import psutil
 import re
@@ -36,6 +38,7 @@
 from happy.HappyProcess import HappyProcess
 import happy.HappyProcessStart
 from WeaveTest import WeaveTest
+from six.moves import map
 
 
 options = {"quiet": False,
@@ -228,9 +231,9 @@
         # TODO: add output extraction outside of container in happy
         process = subprocess.Popen(['sudo','hciconfig'], stdout=subprocess.PIPE)
         out, err = process.communicate()
-        print out
+        out = out.decode("utf-8")
         self.interfaces = [self.extract(interface) for interface in out.split('\n\n') if interface.strip()]
-        print self.interfaces
+        print(self.interfaces)
 
     def initializeBluez(self):
         self.resetBluez()
diff --git a/src/test-apps/happy/test-templates/WeaveConnectionTunnel.py b/src/test-apps/happy/test-templates/WeaveConnectionTunnel.py
index 4f1dcf4..01e5e3e 100644
--- a/src/test-apps/happy/test-templates/WeaveConnectionTunnel.py
+++ b/src/test-apps/happy/test-templates/WeaveConnectionTunnel.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeaveConnectionTunnel class that tests WeaveConnectionTunnel functionality.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -231,13 +233,13 @@
                 pass_test = True
                 break
 
-        print "weave-connection-tunnel test among Agent %s (%s), Source %s (%s), Destination %s (%s)" % \
-                  (self.agent, self.agent_ip, self.source, self.source_ip, self.destination, self.dest_ip)
+        print("weave-connection-tunnel test among Agent %s (%s), Source %s (%s), Destination %s (%s)" % \
+                  (self.agent, self.agent_ip, self.source, self.source_ip, self.destination, self.dest_ip))
 
         if pass_test:
-            print hgreen("succeeded")
+            print(hgreen("succeeded"))
         else:
-            print hred("failed")
+            print(hred("failed"))
 
         return pass_test
 
diff --git a/src/test-apps/happy/test-templates/WeaveDeviceDescription.py b/src/test-apps/happy/test-templates/WeaveDeviceDescription.py
index c967d17..0e004e7 100644
--- a/src/test-apps/happy/test-templates/WeaveDeviceDescription.py
+++ b/src/test-apps/happy/test-templates/WeaveDeviceDescription.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeaveDeviceDescription class that tests Weave DEVICE-DESCRIPTION among two Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import sys
 from happy.ReturnMsg import ReturnMsg
 from happy.Utils import *
@@ -183,13 +185,13 @@
                 break
 
         if self.quiet == False:
-            print "weave-device-description from server %s (%s) to client %s (%s) : " % \
+            print("weave-device-description from server %s (%s) to client %s (%s) : " % \
                 (self.server_node_id, self.server_ip,
-                 self.client_node_id, self.client_ip)
+                 self.client_node_id, self.client_ip))
             if pass_test:
-                print hgreen("Device description operation is completed")
+                print(hgreen("Device description operation is completed"))
             else:
-                print hred("Device description operation is not completed")
+                print(hred("Device description operation is not completed"))
 
         return (pass_test, client_output)
 
diff --git a/src/test-apps/happy/test-templates/WeaveHeartbeat.py b/src/test-apps/happy/test-templates/WeaveHeartbeat.py
index 83abca7..87fd5ca 100644
--- a/src/test-apps/happy/test-templates/WeaveHeartbeat.py
+++ b/src/test-apps/happy/test-templates/WeaveHeartbeat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeaveHeartbeat class that tests Weave Heartbeat among Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -183,11 +185,11 @@
             heartbeat_num += 1
 
         if self.quiet == False:
-            print "weave-heartbeat from node %s (%s) to node %s (%s) : " % \
+            print("weave-heartbeat from node %s (%s) to node %s (%s) : " % \
                 (self.client_node_id, self.client_ip,
-                 self.server_node_id, self.server_ip),
+                 self.server_node_id, self.server_ip), end=' ')
                  
-            print hgreen("%d heartbeats" % (heartbeat_num))
+            print(hgreen("%d heartbeats" % (heartbeat_num)))
             
         return (heartbeat_num, output)
     
diff --git a/src/test-apps/happy/test-templates/WeaveInet.py b/src/test-apps/happy/test-templates/WeaveInet.py
index 45ccb86..3feed83 100644
--- a/src/test-apps/happy/test-templates/WeaveInet.py
+++ b/src/test-apps/happy/test-templates/WeaveInet.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2019 Google LLC.
@@ -24,6 +24,7 @@
 #       between a pair of nodes.
 #
 
+from __future__ import absolute_import
 import os
 import sys
 import time
diff --git a/src/test-apps/happy/test-templates/WeaveInetDNS.py b/src/test-apps/happy/test-templates/WeaveInetDNS.py
index 132ba0f..e73e5c6 100644
--- a/src/test-apps/happy/test-templates/WeaveInetDNS.py
+++ b/src/test-apps/happy/test-templates/WeaveInetDNS.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeaveInet class that tests Weave Inet Layer among Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -134,7 +136,7 @@
             cmd += " --tap-device " + self.tap_if + " -a " + node_ip + " --ipv4-gateway " + self.ipv4_gateway + \
                     " --dns-server " + self.dns
 
-        print "dns check command : {}".format(cmd)
+        print("dns check command : {}".format(cmd))
         self.start_weave_process(self.node_id, cmd, self.node_process_tag, sync_on_output=self.ready_to_service_events_str)
 
 
diff --git a/src/test-apps/happy/test-templates/WeaveInetMulticast.py b/src/test-apps/happy/test-templates/WeaveInetMulticast.py
index cd19a54..90d59fe 100644
--- a/src/test-apps/happy/test-templates/WeaveInetMulticast.py
+++ b/src/test-apps/happy/test-templates/WeaveInetMulticast.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2018-2019 Google LLC.
@@ -23,6 +23,7 @@
 #       among multiple nodes.
 #
 
+from __future__ import absolute_import
 import os
 import sys
 import time
@@ -255,7 +256,7 @@
             # If present, generate and accumulate the LwIP hosted OS
             # network local IPv4 address.
 
-            if self.ipversion == "4" and attributes.has_key('tap-ipv4-local-addr'):
+            if self.ipversion == "4" and 'tap-ipv4-local-addr' in attributes:
                 cmd += " --local-addr " + attributes['tap-ipv4-local-addr']
 
         # Generate and accumulate, if present, the bound network
@@ -300,7 +301,7 @@
 
     # Start the sender test process.
     def __start_sender(self):
-        node = self.configuration['sender'].keys()[0]
+        node = list(self.configuration['sender'].keys())[0]
         attributes = self.configuration['sender'][node]
         tag = "INET-MCAST-TX-0"
 
diff --git a/src/test-apps/happy/test-templates/WeaveKeyExport.py b/src/test-apps/happy/test-templates/WeaveKeyExport.py
index 8f1d5d4..b4754cf 100644
--- a/src/test-apps/happy/test-templates/WeaveKeyExport.py
+++ b/src/test-apps/happy/test-templates/WeaveKeyExport.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -22,6 +22,8 @@
 #       Implements WeaveKeyExport class that tests Weave Key Export protocol among Weave nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -230,14 +232,14 @@
                 break
 
         if self.quiet == False:
-            print "weave-key-export requested by node %s (%s) from node %s (%s) : " % \
+            print("weave-key-export requested by node %s (%s) from node %s (%s) : " % \
                 (self.client_node_id, self.client_ip,
-                 self.server_node_id, self.server_ip),
+                 self.server_node_id, self.server_ip), end=' ')
 
             if fail_test:
-                print hred("FAILED")
+                print(hred("FAILED"))
             else:
-                print hgreen("PASSED")
+                print(hgreen("PASSED"))
 
         return (fail_test, client_output)
 
diff --git a/src/test-apps/happy/test-templates/WeaveMessageLayer.py b/src/test-apps/happy/test-templates/WeaveMessageLayer.py
index 00c3cb3..78861a6 100644
--- a/src/test-apps/happy/test-templates/WeaveMessageLayer.py
+++ b/src/test-apps/happy/test-templates/WeaveMessageLayer.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implementes WeaveMessageLayer class that tests Weave MessageLayer among Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -148,15 +150,15 @@
             total_count = line.split("message ")[1]
 
         if self.quiet == False:
-            print "weave-messagelayer test from node %s (%s) to node %s (%s) : " % \
+            print("weave-messagelayer test from node %s (%s) to node %s (%s) : " % \
                 (self.client_node_id, self.client_ip,
-                 self.server_node_id, self.server_ip),
+                 self.server_node_id, self.server_ip), end=' ')
 
             if total_count == str(self.count):
-                print hgreen("succeed!")
+                print(hgreen("succeed!"))
                 result = True
             else:
-                print hred("failed!") 
+                print(hred("failed!")) 
                 result = False
         return (result, output)
 
diff --git a/src/test-apps/happy/test-templates/WeavePairing.py b/src/test-apps/happy/test-templates/WeavePairing.py
index 8794612..215bb7b 100644
--- a/src/test-apps/happy/test-templates/WeavePairing.py
+++ b/src/test-apps/happy/test-templates/WeavePairing.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       Implements WeavePairing class that tests Weave Pairing among Weave node and device manager.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import random
 import re
@@ -36,6 +38,7 @@
 from happy.HappyNetwork import HappyNetwork
 
 from WeaveTest import WeaveTest
+from six.moves import zip
 
 
 options = {"quiet": False,
@@ -299,7 +302,7 @@
     def __start_mobile_side(self, device_info, mobile_process_tag):
         os.environ['WEAVE_DEVICE_MGR_PATH'] = self.getWeaveDeviceMgrPath()
         os.environ['WEAVE_DEVICE_MGR_LIB_PATH'] = self.getWeaveDeviceMgrLibPath()
-        cmd = "/usr/bin/env python " + \
+        cmd = "/usr/bin/env python3 " + \
             os.path.dirname(os.path.realpath(__file__)) + "/../lib/WeaveDeviceManager.py"
         if not cmd:
             return
@@ -367,9 +370,9 @@
                 result_list.append(False)
 
         for device_info, result in zip(devices_info, result_list):
-            print " %s weave-pairing from mobile %s (%s) to device %s (%s) : " % \
+            print(" %s weave-pairing from mobile %s (%s) to device %s (%s) : " % \
                 ("Success for" if result else "Fail for", self.mobile_node_id,
-                 self.mobile_ip, device_info['device_node_id'], device_info['device_ip'])
+                 self.mobile_ip, device_info['device_node_id'], device_info['device_ip']))
 
         return result_list
 
diff --git a/src/test-apps/happy/test-templates/WeavePing.py b/src/test-apps/happy/test-templates/WeavePing.py
index 6fcd090..700a3c1 100644
--- a/src/test-apps/happy/test-templates/WeavePing.py
+++ b/src/test-apps/happy/test-templates/WeavePing.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeavePing class that tests Weave Echo among Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import re
@@ -213,21 +215,21 @@
                 try:
                     loss_percentage = 100 - float(m.group(1))
                 except Exception:
-                    print hred("Failed to parse %s", )
+                    print(hred("Failed to parse %s", ))
 
         if loss_percentage == None:
             # hmmm, we haven't found our line
             loss_percentage = 100
 
         if self.quiet == False:
-            print "weave-ping from node %s (%s) to node %s (%s) : " % \
+            print("weave-ping from node %s (%s) to node %s (%s) : " % \
                 (client_info['client_node_id'], client_info['client_ip'],
-                 self.server_node_id, self.server_ip),
+                 self.server_node_id, self.server_ip), end=' ')
 
             if loss_percentage == 0:
-                print hgreen("%f%% packet loss" % (loss_percentage))
+                print(hgreen("%f%% packet loss" % (loss_percentage)))
             else:
-                print hred("%f%% packet loss" % (loss_percentage))
+                print(hred("%f%% packet loss" % (loss_percentage)))
 
         return  loss_percentage # indicate the loss for each client
 
diff --git a/src/test-apps/happy/test-templates/WeaveSWU.py b/src/test-apps/happy/test-templates/WeaveSWU.py
index 6c4429e..a4e7ae7 100644
--- a/src/test-apps/happy/test-templates/WeaveSWU.py
+++ b/src/test-apps/happy/test-templates/WeaveSWU.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeaveSWU class that tests Weave SWU among two Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import sys
 
 from happy.ReturnMsg import ReturnMsg
@@ -245,13 +247,13 @@
                 break
 
         if self.quiet == False:
-            print "weave-swu from server %s (%s) to client %s (%s) : " % \
+            print("weave-swu from server %s (%s) to client %s (%s) : " % \
                 (self.server_node_id, self.server_ip,
-                 self.client_node_id, self.client_ip)
+                 self.client_node_id, self.client_ip))
             if pass_test:
-                print hgreen("SWU interaction is completed")
+                print(hgreen("SWU interaction is completed"))
             else:
-                print hred("SWU interaction is not completed")
+                print(hred("SWU interaction is not completed"))
 
         return (pass_test, client_output)
 
diff --git a/src/test-apps/happy/test-templates/WeaveSecurityPing.py b/src/test-apps/happy/test-templates/WeaveSecurityPing.py
index 3595987..7597d21 100644
--- a/src/test-apps/happy/test-templates/WeaveSecurityPing.py
+++ b/src/test-apps/happy/test-templates/WeaveSecurityPing.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implementes WeaveiSecurityPing class that tests Weave Security Ping(CASE, PASE) among Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -270,7 +272,7 @@
             for token in line.split():
                 if "%" in token:
                     loss_percentage = token.strip().split("(")[1]
-                    loss_percentage = loss_percentage.translate(None, "()%")
+                    loss_percentage = loss_percentage.translate(str.maketrans(dict.fromkeys("()%")))
 
         if loss_percentage == None:
             # hmmm, we haven't found our line
@@ -280,14 +282,14 @@
             loss_percentage = 100 - loss_percentage
 
         if self.quiet == False:
-            print "weave-security-ping from node %s (%s) to node %s (%s) : " % \
+            print("weave-security-ping from node %s (%s) to node %s (%s) : " % \
                 (self.client_node_id, self.client_ip,
-                 self.server_node_id, self.server_ip),
+                 self.server_node_id, self.server_ip), end=' ')
 
             if loss_percentage == 0:
-                print hgreen("%d%% packet loss" % (loss_percentage))
+                print(hgreen("%d%% packet loss" % (loss_percentage)))
             else:
-                print hred("%d%% packet loss" % (loss_percentage))
+                print(hred("%d%% packet loss" % (loss_percentage)))
 
         return (loss_percentage, output) # indicate the loss for each client
 
diff --git a/src/test-apps/happy/test-templates/WeaveServiceDir.py b/src/test-apps/happy/test-templates/WeaveServiceDir.py
index 545db4e..eba5fbe 100644
--- a/src/test-apps/happy/test-templates/WeaveServiceDir.py
+++ b/src/test-apps/happy/test-templates/WeaveServiceDir.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       between a node and a service.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -40,6 +42,7 @@
 from WeaveTest import WeaveTest
 import WeaveUtilities
 import plugins.plaid.Plaid as Plaid
+from functools import reduce
 
 
 options = {}
@@ -163,15 +166,15 @@
                 result["connection_completed"] = True
                 break
 
-        final_result = reduce((lambda x, y: x and y), result.values())
+        final_result = reduce((lambda x, y: x and y), list(result.values()))
 
-        print "weave-service-dir test from client %s to service %s: " % (self.client, self.service)
+        print("weave-service-dir test from client %s to service %s: " % (self.client, self.service))
 
         if self.quiet == False:
             if final_result: 
-                print hgreen("succeeded")
+                print(hgreen("succeeded"))
             else:
-                print hred("failed")
+                print(hred("failed"))
 
         if not final_result:
             pprint.pprint(result)
@@ -312,7 +315,7 @@
         data["service_output"] = service_output_data
         data["result_details"] = result
 
-        final_result = reduce((lambda x, y: x and y), result.values())
+        final_result = reduce((lambda x, y: x and y), list(result.values()))
 
         self.logger.debug("[localhost] WeaveServiceDir: Done.")
         return ReturnMsg(final_result, data)
diff --git a/src/test-apps/happy/test-templates/WeaveTime.py b/src/test-apps/happy/test-templates/WeaveTime.py
index ab326ed..8777dc3 100644
--- a/src/test-apps/happy/test-templates/WeaveTime.py
+++ b/src/test-apps/happy/test-templates/WeaveTime.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeaveTime class that tests Weave Time sync among Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -243,24 +245,24 @@
             if coordinator_leak_detected:
                 found_leaks.append("coordinator")
 
-            print "weave-time test among server %s (%s), client %s (%s), coordinator %s (%s) with %s mode: " % \
+            print("weave-time test among server %s (%s), client %s (%s), coordinator %s (%s) with %s mode: " % \
                         (self.server_node_id, self.server_ip,
                          self.client_node_id, self.client_ip,
-                         self.coordinator_node_id, self.coordinator_ip, self.mode)
+                         self.coordinator_node_id, self.coordinator_ip, self.mode))
         else:
-            print "weave-time test among server %s (%s), client %s (%s) with %s mode: " % \
+            print("weave-time test among server %s (%s), client %s (%s) with %s mode: " % \
                         (self.server_node_id, self.server_ip,
-                         self.client_node_id, self.client_ip, self.mode)
+                         self.client_node_id, self.client_ip, self.mode))
 
         if self.quiet == False:
             if parser_errors:
-                print hred("Parser errors on " + str(parser_errors))
+                print(hred("Parser errors on " + str(parser_errors)))
             if found_leaks:
-                print hred("Found leaks on " + str(found_leaks))
+                print(hred("Found leaks on " + str(found_leaks)))
             if pass_test:
-                print hgreen("Time sync succeeded")
+                print(hgreen("Time sync succeeded"))
             else:
-                print hred("Time sync failed")
+                print(hred("Time sync failed"))
 
         return pass_test and not parser_errors and not found_leaks
 
diff --git a/src/test-apps/happy/test-templates/WeaveTunnelStart.py b/src/test-apps/happy/test-templates/WeaveTunnelStart.py
index ffea21c..7fa23ec 100644
--- a/src/test-apps/happy/test-templates/WeaveTunnelStart.py
+++ b/src/test-apps/happy/test-templates/WeaveTunnelStart.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,7 @@
 #       between border-gateway and a service.
 #
 
+from __future__ import absolute_import
 import os
 import sys
 import time
@@ -147,7 +148,7 @@
 
         # Check if service node was given in the environment
         if not self.service and not self.service_dir:
-            if "weave_service_address" in os.environ.keys():
+            if "weave_service_address" in list(os.environ.keys()):
                 self.service = os.environ['weave_service_address']
                 emsg = "Found weave_service_address %s." % (self.service)
                 self.logger.debug("[localhost] Weave: %s" % (emsg))
@@ -157,7 +158,7 @@
                 self.skip_service_end = True
                 self.logger.debug("[localhost] WeaveTunnelStart against tier %s." % self.service_dir_server)
             else:
-                if "weave_service_address" in os.environ.keys():
+                if "weave_service_address" in list(os.environ.keys()):
                     self.skip_service_end = True
                     if "unstable" not in os.environ["weave_service_address"]:
                         self.service_dir_server = os.environ["weave_service_address"]
diff --git a/src/test-apps/happy/test-templates/WeaveTunnelStop.py b/src/test-apps/happy/test-templates/WeaveTunnelStop.py
index f5f8a4a..6d8dcb2 100644
--- a/src/test-apps/happy/test-templates/WeaveTunnelStop.py
+++ b/src/test-apps/happy/test-templates/WeaveTunnelStop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,7 @@
 #       between border-gateway and a service.
 #
 
+from __future__ import absolute_import
 import os
 import sys
 
diff --git a/src/test-apps/happy/test-templates/WeaveTunnelTest.py b/src/test-apps/happy/test-templates/WeaveTunnelTest.py
index db4a3e4..0687514 100644
--- a/src/test-apps/happy/test-templates/WeaveTunnelTest.py
+++ b/src/test-apps/happy/test-templates/WeaveTunnelTest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       Tunnel tests between border-gateway and a service.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -36,7 +38,6 @@
 import happy.HappyNodeRoute
 import happy.HappyNetworkAddress
 
-import WeaveTunnelStop
 from WeaveTest import WeaveTest
 
 
@@ -172,10 +173,10 @@
                         testName = str
 
                 if "'FAILED'" in line:
-                    print hred(testName + ":" + " FAILED ")
+                    print(hred(testName + ":" + " FAILED "))
                     pass_test = False
                 if "'PASSED'" in line:
-                    print hgreen(testName + ":" + " PASSED ")
+                    print(hgreen(testName + ":" + " PASSED "))
 
 
         return (pass_test, client_output)
diff --git a/src/test-apps/happy/test-templates/WeaveWDMv0.py b/src/test-apps/happy/test-templates/WeaveWDMv0.py
index 1bc4a01..685bf4b 100644
--- a/src/test-apps/happy/test-templates/WeaveWDMv0.py
+++ b/src/test-apps/happy/test-templates/WeaveWDMv0.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeaveWDMv0 class that tests Weave WDMv0 among two Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import sys
 
 from happy.ReturnMsg import ReturnMsg
@@ -185,13 +187,13 @@
                 break
 
         if self.quiet == False:
-            print "weave-wdmv0 from server %s (%s) to client %s (%s) : " % \
+            print("weave-wdmv0 from server %s (%s) to client %s (%s) : " % \
                 (self.server_node_id, self.server_ip,
-                 self.client_node_id, self.client_ip)
+                 self.client_node_id, self.client_ip))
             if pass_test:
-                print hgreen("WDMv0 test is completed")
+                print(hgreen("WDMv0 test is completed"))
             else:
-                print hred("WDMv0 test is not completed")
+                print(hred("WDMv0 test is not completed"))
 
         return (pass_test, client_output)
 
diff --git a/src/test-apps/happy/test-templates/WeaveWRMP.py b/src/test-apps/happy/test-templates/WeaveWRMP.py
index 6299dc1..10dab4b 100644
--- a/src/test-apps/happy/test-templates/WeaveWRMP.py
+++ b/src/test-apps/happy/test-templates/WeaveWRMP.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Implements WeaveWRMP class that tests Weave Echo among Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import sys
 import time
@@ -178,13 +180,13 @@
                 break
 
         if self.quiet == False:
-            print "weave-wrmp from node %s (%s) to node %s (%s) : " % \
+            print("weave-wrmp from node %s (%s) to node %s (%s) : " % \
                 (self.client_node_id, self.client_ip,
-                 self.server_node_id, self.server_ip),
+                 self.server_node_id, self.server_ip), end=' ')
             if pass_test:
-                print hgreen("PASSED")
+                print(hgreen("PASSED"))
             else:
-                print hred("FAILED")
+                print(hred("FAILED"))
 
         return (pass_test, client_output)
 
diff --git a/src/test-apps/happy/test-templates/WeaveWdmNext.py b/src/test-apps/happy/test-templates/WeaveWdmNext.py
index 01bcd83..34efbf9 100644
--- a/src/test-apps/happy/test-templates/WeaveWdmNext.py
+++ b/src/test-apps/happy/test-templates/WeaveWdmNext.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -22,6 +22,8 @@
 #       Implementes WeaveWdmNext Next class that tests Weave WDM Next among Weave Nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import re
 import sys
@@ -36,6 +38,7 @@
 from WeaveTest import WeaveTest
 import WeaveUtilities
 import plugins.plaid.Plaid as Plaid
+from functools import reduce
 
 options = { "clients": None,
             "server": None,
@@ -320,7 +323,7 @@
         if self.wdm_option == "view":
             self.wdm_client_option = " --wdm-simple-view-client"
             self.wdm_server_option = " --wdm-simple-view-server"
-            print "view disabled"
+            print("view disabled")
             sys.exit(1)
         elif self.wdm_option == "one_way_subscribe":
             self.wdm_client_option = " --wdm-one-way-sub-client"
@@ -351,17 +354,17 @@
             result["no_server_leak_detected"] = not server_leak_detected
 
         if self.quiet is False:
-            print "weave-wdm-next %s from node %s (%s) to node %s (%s) : "\
-                  % (self.wdm_option, client_info["client_node_id"], client_info["client_ip"], self.server_node_id, self.server_ip)
+            print("weave-wdm-next %s from node %s (%s) to node %s (%s) : "\
+                  % (self.wdm_option, client_info["client_node_id"], client_info["client_ip"], self.server_node_id, self.server_ip))
 
             if client_parser_error is True:
-                print hred("client parser error")
+                print(hred("client parser error"))
             if client_leak_detected is True:
-                print hred("client_resource leak detected")
+                print(hred("client_resource leak detected"))
             if server_parser_error is True:
-                print hred("server parser error")
+                print(hred("server parser error"))
             if server_leak_detected is True:
-                print hred("server resource leak detected")
+                print(hred("server resource leak detected"))
 
         return result
 
@@ -572,11 +575,11 @@
 
         if False:
             try:
-                print "cmd = \n" + cmd
-                print "sleeping..."
+                print("cmd = \n" + cmd)
+                print("sleeping...")
                 time.sleep(60*60)
             except:
-                print "sleep interrupted"
+                print("sleep interrupted")
 
         if self.use_plaid:
             custom_env = self.plaid.getPlaidClientLibEnv(client_info["client_node_id"])
@@ -646,7 +649,7 @@
 
             success_dic = self.__process_results(client_output_data, server_output_data, client_info)
 
-            success = reduce(lambda x, y: x and y, success_dic.values())
+            success = reduce(lambda x, y: x and y, list(success_dic.values()))
 
 
             data = {}
diff --git a/src/test-apps/happy/test-templates/generated/nest/messages/schema_version_pb2.py b/src/test-apps/happy/test-templates/generated/nest/messages/schema_version_pb2.py
index b2f7460..68b2d3d 100644
--- a/src/test-apps/happy/test-templates/generated/nest/messages/schema_version_pb2.py
+++ b/src/test-apps/happy/test-templates/generated/nest/messages/schema_version_pb2.py
@@ -18,6 +18,7 @@
 # Generated by the protocol buffer compiler.  DO NOT EDIT!
 # source: nest/messages/schema_version.proto
 
+from __future__ import absolute_import
 import sys
 _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
 from google.protobuf import descriptor as _descriptor
diff --git a/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v1/trait_api_pb2.py b/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v1/trait_api_pb2.py
index ed91b90..b405132 100644
--- a/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v1/trait_api_pb2.py
+++ b/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v1/trait_api_pb2.py
@@ -18,6 +18,7 @@
 # Generated by the protocol buffer compiler.  DO NOT EDIT!
 # source: nestlabs/gateway/v1/trait_api.proto
 
+from __future__ import absolute_import
 import sys
 _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
 from google.protobuf import descriptor as _descriptor
diff --git a/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v2/gateway_api_pb2.py b/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v2/gateway_api_pb2.py
index f856580..8fbfe94 100644
--- a/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v2/gateway_api_pb2.py
+++ b/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v2/gateway_api_pb2.py
@@ -18,6 +18,7 @@
 # Generated by the protocol buffer compiler.  DO NOT EDIT!
 # source: nestlabs/gateway/v2/gateway_api.proto
 
+from __future__ import absolute_import
 import sys
 _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
 from google.protobuf.internal import enum_type_wrapper
diff --git a/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v2/gateway_api_pb2_grpc.py b/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v2/gateway_api_pb2_grpc.py
index 4cad21a..0b9352e 100644
--- a/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v2/gateway_api_pb2_grpc.py
+++ b/src/test-apps/happy/test-templates/generated/nestlabs/gateway/v2/gateway_api_pb2_grpc.py
@@ -16,6 +16,7 @@
 #   limitations under the License.
 #
 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+from __future__ import absolute_import
 import grpc
 
 from nestlabs.gateway.v2 import gateway_api_pb2 as nestlabs_dot_gateway_dot_v2_dot_gateway__api__pb2
diff --git a/src/test-apps/happy/test-templates/generated/wdl/data_access_pb2.py b/src/test-apps/happy/test-templates/generated/wdl/data_access_pb2.py
index f244164..e4f7a0a 100644
--- a/src/test-apps/happy/test-templates/generated/wdl/data_access_pb2.py
+++ b/src/test-apps/happy/test-templates/generated/wdl/data_access_pb2.py
@@ -18,6 +18,7 @@
 # Generated by the protocol buffer compiler.  DO NOT EDIT!
 # source: wdl/data_access.proto
 
+from __future__ import absolute_import
 import sys
 _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
 from google.protobuf.internal import enum_type_wrapper
diff --git a/src/test-apps/happy/tests/service/echo/test_weave_echo_01.py b/src/test-apps/happy/tests/service/echo/test_weave_echo_01.py
index 82aeac3..5b555b3 100755
--- a/src/test-apps/happy/tests/service/echo/test_weave_echo_01.py
+++ b/src/test-apps/happy/tests/service/echo/test_weave_echo_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       A01: Calls Weave Echo with udp over tunnel between mock device and real service.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from test_weave_echo_base import test_weave_echo_base
 
@@ -34,8 +36,8 @@
         echo_args["endpoint"] = 'Echo'
         echo_args['test_tag'] = self.__class__.__name__
         echo_args['test_case_name'] = ['Echo-NestService-A01: Calls Weave Echo with udp over tunnel between mock device and real service.']
-        print 'test file: ' + self.__class__.__name__
-        print "weave echo test A01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave echo test A01")
         super(test_weave_echo_01, self).weave_echo_base(echo_args)
 
 
diff --git a/src/test-apps/happy/tests/service/echo/test_weave_echo_02.py b/src/test-apps/happy/tests/service/echo/test_weave_echo_02.py
index 0d14018..8daabbf 100755
--- a/src/test-apps/happy/tests/service/echo/test_weave_echo_02.py
+++ b/src/test-apps/happy/tests/service/echo/test_weave_echo_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       A02: Calls Weave Echo with wrmp over tunnel between mock device and real service.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from test_weave_echo_base import test_weave_echo_base
 
@@ -34,8 +36,8 @@
         echo_args["endpoint"] = 'Echo'
         echo_args['test_tag'] = self.__class__.__name__
         echo_args['test_case_name'] = ['Echo-NestService-A02: Calls Weave Echo with wrmp over tunnel between mock device and real service.']
-        print 'test file: ' + self.__class__.__name__
-        print "weave echo test A02"
+        print('test file: ' + self.__class__.__name__)
+        print("weave echo test A02")
         super(test_weave_echo_02, self).weave_echo_base(echo_args)
 
 
diff --git a/src/test-apps/happy/tests/service/echo/test_weave_echo_03.py b/src/test-apps/happy/tests/service/echo/test_weave_echo_03.py
index f2f7bb6..529e44c 100755
--- a/src/test-apps/happy/tests/service/echo/test_weave_echo_03.py
+++ b/src/test-apps/happy/tests/service/echo/test_weave_echo_03.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -23,6 +23,8 @@
 #            shared CASE session.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from test_weave_echo_base import test_weave_echo_base
 
@@ -33,43 +35,43 @@
         echo_args["wrmp"] = True
         echo_args['test_tag'] = self.__class__.__name__
         echo_args['test_case_name'] = ['Echo-NestService-A03: Calls Weave Echo with wrmp over tunnel between mock device and real service through shared CASE session.']
-        print 'test file: ' + self.__class__.__name__
+        print('test file: ' + self.__class__.__name__)
 
-        print "weave echo test A03: to the Core Router using CASE session"
+        print("weave echo test A03: to the Core Router using CASE session")
         echo_args["case_shared"] = False
         echo_args["endpoint"] = "ServiceRouter"
         super(test_weave_echo_03, self).weave_echo_base(echo_args)
 
-        print "weave echo test A03: to the Core Router using shared CASE session"
+        print("weave echo test A03: to the Core Router using shared CASE session")
         echo_args["case_shared"] = True
         echo_args["endpoint"] = "ServiceRouter"
         super(test_weave_echo_03, self).weave_echo_base(echo_args)
 
-        print "weave echo test A03: to the Software Update Endpoint using shared CASE session"
+        print("weave echo test A03: to the Software Update Endpoint using shared CASE session")
         echo_args["endpoint"] = "SoftwareUpdate"
         super(test_weave_echo_03, self).weave_echo_base(echo_args)
 
-        print "weave echo test A03: to the Data Management Endpoint using shared CASE session"
+        print("weave echo test A03: to the Data Management Endpoint using shared CASE session")
         echo_args["endpoint"] = "DataManagement"
         super(test_weave_echo_03, self).weave_echo_base(echo_args)
 
-        print "weave echo test A03: to the Log Updload Endpoint using shared CASE session"
+        print("weave echo test A03: to the Log Updload Endpoint using shared CASE session")
         echo_args["endpoint"] = "LogUpload"
         super(test_weave_echo_03, self).weave_echo_base(echo_args)
 
-        print "weave echo test A03: to the Service Provisioning Endpoint using shared CASE session"
+        print("weave echo test A03: to the Service Provisioning Endpoint using shared CASE session")
         echo_args["endpoint"] = "ServiceProvisioning"
         super(test_weave_echo_03, self).weave_echo_base(echo_args)
 
-        print "weave echo test A03: to the Tunnel Endpoint using shared CASE session"
+        print("weave echo test A03: to the Tunnel Endpoint using shared CASE session")
         echo_args["endpoint"] = "Tunnel"
         super(test_weave_echo_03, self).weave_echo_base(echo_args)
 
-        print "weave echo test A03: to the File Download Endpoint using shared CASE session"
+        print("weave echo test A03: to the File Download Endpoint using shared CASE session")
         echo_args["endpoint"] = "FileDownload"
         super(test_weave_echo_03, self).weave_echo_base(echo_args)
 
-        print "weave echo test A03: to the Bastion Service Endpoint using shared CASE session"
+        print("weave echo test A03: to the Bastion Service Endpoint using shared CASE session")
         echo_args["endpoint"] = "BastionService"
         super(test_weave_echo_03, self).weave_echo_base(echo_args)
 
diff --git a/src/test-apps/happy/tests/service/echo/test_weave_echo_base.py b/src/test-apps/happy/tests/service/echo/test_weave_echo_base.py
index 716e23a..b329a70 100755
--- a/src/test-apps/happy/tests/service/echo/test_weave_echo_base.py
+++ b/src/test-apps/happy/tests/service/echo/test_weave_echo_base.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       base class for weave echo between mock device and real service.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import sys
@@ -36,6 +38,7 @@
 import plugins.testrail.TestrailResultOutput
 
 from topologies.dynamic.thread_wifi_ap_internet_configurable_topology import thread_wifi_ap_internet_configurable_topology
+from six.moves import range
 
 TEST_OPTION_QUIET = True
 DEFAULT_FABRIC_SEED = "00000"
@@ -56,7 +59,7 @@
 
         fabric_seed = os.environ.get("FABRIC_SEED", DEFAULT_FABRIC_SEED)
 
-        if "FABRIC_OFFSET" in os.environ.keys():
+        if "FABRIC_OFFSET" in list(os.environ.keys()):
             self.fabric_id = format(int(fabric_seed, 16) + int(os.environ["FABRIC_OFFSET"]), 'x').zfill(5)
         else:
             self.fabric_id = fabric_seed
@@ -70,7 +73,7 @@
         self.test_timeout = int(os.environ.get("TEST_TIMEOUT", 60 * 30))
 
         # TODO: Once LwIP bugs for tunnel are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.tap = True
             self.tap_id = "wpan0"
             return
@@ -90,7 +93,7 @@
                                                                           device_numbers=self.device_numbers)
             self.topology.createTopology()
         else:
-            print "topology set up not required"
+            print("topology set up not required")
 
         self.weave_wdm = None
         # Wait for a second to ensure that Weave ULA addresses passed dad
@@ -171,23 +174,23 @@
     def __process_result(self, nodeA, nodeB, value, all_data):
         success = True
         for data in all_data:
-            print "ping from " + data['client'] + " to " + nodeB + " ",
+            print("ping from " + data['client'] + " to " + nodeB + " ", end=' ')
 
             if value > ERROR_THRESHOLD_PERCENTAGE:
                 success = False
-                print hred("Failed")
+                print(hred("Failed"))
             else:
-                print hgreen("Passed")
+                print(hgreen("Passed"))
 
             try:
                 self.assertTrue(value < ERROR_THRESHOLD_PERCENTAGE, "%s < %d %%" % (str(value), ERROR_THRESHOLD_PERCENTAGE))
-            except AssertionError, e:
-                print str(e)
-                print "Captured experiment result:"
+            except AssertionError as e:
+                print(str(e))
+                print("Captured experiment result:")
 
-                print "Client Output: "
+                print("Client Output: ")
                 for line in data["client_output"].split("\n"):
-                   print "\t" + line
+                   print("\t" + line)
 
             test_results = []
 
diff --git a/src/test-apps/happy/tests/service/pairing/test_weave_pairing_01.py b/src/test-apps/happy/tests/service/pairing/test_weave_pairing_01.py
index c140d74..03415f3 100755
--- a/src/test-apps/happy/tests/service/pairing/test_weave_pairing_01.py
+++ b/src/test-apps/happy/tests/service/pairing/test_weave_pairing_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -26,6 +26,8 @@
 #       and ThreadNode register to NestService.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import re
 import sys
@@ -40,6 +42,8 @@
 import plugins.testrail.TestrailResultOutput
 
 from topologies.dynamic.thread_wifi_ap_internet_configurable_topology import thread_wifi_ap_internet_configurable_topology
+from six.moves import range
+from six.moves import zip
 
 TEST_OPTION_QUIET = True
 TESTRAIL_SECTION_NAME = "Weave pairing between Mock-Client and Real-Service"
@@ -54,7 +58,7 @@
         self.quiet = TEST_OPTION_QUIET
         self.options = None
 
-        if "weave_service_address" in os.environ.keys():
+        if "weave_service_address" in list(os.environ.keys()):
             if "unstable" not in os.environ["weave_service_address"]:
                 found = re.search('.(\w+).nestlabs.com', os.environ["weave_service_address"])
                 self.tier = found.group(1)
@@ -66,7 +70,7 @@
 
         fabric_seed = os.environ.get("FABRIC_SEED", DEFAULT_FABRIC_SEED)
 
-        if "FABRIC_OFFSET" in os.environ.keys():
+        if "FABRIC_OFFSET" in list(os.environ.keys()):
             self.fabric_id = format(int(fabric_seed, 16) + int(os.environ["FABRIC_OFFSET"]), 'x').zfill(5)
         else:
             self.fabric_id = fabric_seed
@@ -86,7 +90,7 @@
         self.initial_device_index = int(os.environ.get("INITIAL_DEVICE_INDEX", "1"))
 
         # TODO: Once LwIP bugs for tunnel are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.tap = True
             self.tap_id = "wpan0"
             return
@@ -108,7 +112,7 @@
                                                                           initial_device_index=self.initial_device_index)
             self.topology.createTopology()
         else:
-            print "topology set up not required"
+            print("topology set up not required")
 
         self.show_strace = False
 
@@ -135,8 +139,8 @@
 
     def test_weave_pairing(self):
         # TODO: Once LwIP bugs are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
-            print hred("WARNING: Test skipped due to LwIP-based network cofiguration!")            
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+            print(hred("WARNING: Test skipped due to LwIP-based network cofiguration!"))            
             return
 
         # topology has nodes: ThreadNode, BorderRouter, onhub and NestService instance
@@ -187,28 +191,28 @@
     def __process_result(self, nodeA, nodeB, value, data):
         success = True
         for result, device_output, device_strace, device_info in zip(value, data['devices_output'], data['devices_strace'], data['devices_info']):
-            print "Service provision from " + device_info['resource']['id']+ " to real NestService using " + nodeB + " ",
+            print("Service provision from " + device_info['resource']['id']+ " to real NestService using " + nodeB + " ", end=' ')
 
             if result is True:
-                print hgreen("Passed")
+                print(hgreen("Passed"))
             else:
                 success = False
-                print hred("Failed")
+                print(hred("Failed"))
 
             try:
                 self.assertTrue(value, "result %s == True %%" % (str(result)))
-            except AssertionError, e:
-                print str(e)
-                print "Captured experiment result:"
+            except AssertionError as e:
+                print(str(e))
+                print("Captured experiment result:")
 
-                print "Device Output: "
+                print("Device Output: ")
                 for line in device_output.split("\n"):
-                   print "\t" + line
+                   print("\t" + line)
 
                 if self.show_strace == True:
-                    print " Device Strace: "
+                    print(" Device Strace: ")
                     for line in device_strace.split("\n"):
-                        print "\t" + line
+                        print("\t" + line)
 
             test_results = []
 
diff --git a/src/test-apps/happy/tests/service/run_parallel_weave_service_test.sh b/src/test-apps/happy/tests/service/run_parallel_weave_service_test.sh
index 5e79d24..384b80b 100755
--- a/src/test-apps/happy/tests/service/run_parallel_weave_service_test.sh
+++ b/src/test-apps/happy/tests/service/run_parallel_weave_service_test.sh
@@ -77,7 +77,7 @@
     while [ $(jobs | wc -l) -ge $BUILD_JOBS ] ; do sleep 1 ; done
     action="$1"
     x=`printf "%03d" ${i}`
-    HAPPY_STATE_ID=${x} FABRIC_OFFSET=${i} DEVICE_NUMBERS=${device_numbers} TOPOLOGY=${topology} FABRIC_SEED=${fabric_seed} python $6  &
+    HAPPY_STATE_ID=${x} FABRIC_OFFSET=${i} DEVICE_NUMBERS=${device_numbers} TOPOLOGY=${topology} FABRIC_SEED=${fabric_seed} python3 $6  &
     pids+="$! "
     pid_array["$!"]=${x}
 done
diff --git a/src/test-apps/happy/tests/service/run_single_weave_service_test.sh b/src/test-apps/happy/tests/service/run_single_weave_service_test.sh
index 0be4eb6..1eb2d6f 100755
--- a/src/test-apps/happy/tests/service/run_single_weave_service_test.sh
+++ b/src/test-apps/happy/tests/service/run_single_weave_service_test.sh
@@ -34,16 +34,18 @@
 export RESOURCE_IDS='thd1'
 export FABRIC_SEED='00001'
 export DEVICE_NUMBERS=1
-
 # exit if something fails
 set -e
 
 if [[ $# -eq 0 ]]
 then
     pairing/test_weave_pairing_01.py
-    wdmNext/test_weave_wdm_next_service_mutual_subscribe_01.py
+    # wdmNext/test_weave_wdm_next_service_mutual_subscribe_05.py
+    # wdmNext/test_weave_wdm_next_service_mutual_subscribe_09.py
+    # wdmNext/test_weave_wdm_next_service_mutual_subscribe_17.py
+    # wdmNext/test_weave_wdm_next_service_update_01_cond_OneLeaf.py
 else
-    for test_to_run in $* ; do python $test_to_run ;  done
+    for test_to_run in $* ; do python3 $test_to_run ;  done
 fi
 
 echo All tests have run
diff --git a/src/test-apps/happy/tests/service/time/test_weave_time_01.py b/src/test-apps/happy/tests/service/time/test_weave_time_01.py
index 6aaa7ed..16a0ffc 100755
--- a/src/test-apps/happy/tests/service/time/test_weave_time_01.py
+++ b/src/test-apps/happy/tests/service/time/test_weave_time_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
 #    All rights reserved.
@@ -24,6 +24,8 @@
 #          client -> (TimeSyncRequest) -> Tunnel -> Service Router
 #          client <- (TimeSyncResponse) <- Tunnel <- Service Router
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import re
@@ -61,7 +63,7 @@
         self.device_numbers = int(os.environ.get("DEVICE_NUMBERS", 3))
         fabric_seed = os.environ.get("FABRIC_SEED", DEFAULT_FABRIC_SEED)
 
-        if "FABRIC_OFFSET" in os.environ.keys():
+        if "FABRIC_OFFSET" in list(os.environ.keys()):
             self.fabric_id = format(int(fabric_seed, 16) + int(os.environ["FABRIC_OFFSET"]), 'x').zfill(5)
         else:
             self.fabric_id = fabric_seed
@@ -70,7 +72,7 @@
         self.customized_eui64_seed = self.eui64_prefix + self.fabric_id[0:2] + ':' + self.fabric_id[2:4] + ':' + self.fabric_id[4:]
 
         # TODO: Once LwIP bugs for tunnel are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.tap = True
             self.tap_id = "wpan0"
             return
@@ -88,7 +90,7 @@
 
             self.topology.createTopology()
         else:
-            print "topology set up not required"
+            print("topology set up not required")
 
         self.show_strace = False
 
@@ -182,15 +184,15 @@
         found = re.search(condition, data["client_output"])
         if found:
             success = True
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
             success = False
-            print hred("Failed")
-            print "Captured experiment result:"
+            print(hred("Failed"))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
         test_results = []
 
diff --git a/src/test-apps/happy/tests/service/tunnel/test_weave_tunnel_01.py b/src/test-apps/happy/tests/service/tunnel/test_weave_tunnel_01.py
index 8d286f2..70b02d4 100755
--- a/src/test-apps/happy/tests/service/tunnel/test_weave_tunnel_01.py
+++ b/src/test-apps/happy/tests/service/tunnel/test_weave_tunnel_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       A01: Calls Weave Tunnel between a simulated BorderRouter and NestService
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import re
@@ -58,7 +60,7 @@
 
         fabric_seed = os.environ.get("FABRIC_SEED", DEFAULT_FABRIC_SEED)
 
-        if "FABRIC_OFFSET" in os.environ.keys():
+        if "FABRIC_OFFSET" in list(os.environ.keys()):
             self.fabric_id = format(int(fabric_seed, 16) + int(os.environ["FABRIC_OFFSET"]), 'x').zfill(5)
         else:
             self.fabric_id = fabric_seed
@@ -68,7 +70,7 @@
         self.customized_eui64_seed = self.eui64_prefix + self.fabric_id[0:2] + ':' + self.fabric_id[2:4] + ':' + self.fabric_id[4:]
 
         # TODO: Once LwIP bugs for tunnel are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.tap = True
             self.tap_id = "wpan0"
             return
@@ -87,7 +89,7 @@
                                                                           dns=None)
             self.topology.createTopology()
         else:
-            print "topology set up not required"
+            print("topology set up not required")
 
         self.show_strace = False
 
@@ -156,15 +158,15 @@
         found = re.search(condition, data["gateway_output"])
         if found:
             success = True
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
             success = False
-            print hred("Failed")
-            print "Captured experiment result:"
+            print(hred("Failed"))
+            print("Captured experiment result:")
 
-            print "Gateway Output: "
+            print("Gateway Output: ")
             for line in data["gateway_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
         test_results = []
 
diff --git a/src/test-apps/happy/tests/service/tunnel/test_weave_tunnel_02.py b/src/test-apps/happy/tests/service/tunnel/test_weave_tunnel_02.py
index aeb9548..c5e2260 100755
--- a/src/test-apps/happy/tests/service/tunnel/test_weave_tunnel_02.py
+++ b/src/test-apps/happy/tests/service/tunnel/test_weave_tunnel_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       from ThreadNode to NestService. Kick out the connection in primary tunnel,
 #       and the weave-ping can still work with backup tunnel
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import re
@@ -42,6 +44,7 @@
 import plugins.testrail.TestrailResultOutput
 
 from topologies.dynamic.thread_wifi_ap_internet_configurable_topology import thread_wifi_ap_internet_configurable_topology
+from six.moves import range
 
 TEST_OPTION_QUIET = True
 DEFAULT_FABRIC_SEED = "00000"
@@ -69,7 +72,7 @@
 
         fabric_seed = os.environ.get("FABRIC_SEED", DEFAULT_FABRIC_SEED)
 
-        if "FABRIC_OFFSET" in os.environ.keys():
+        if "FABRIC_OFFSET" in list(os.environ.keys()):
             self.fabric_id = format(int(fabric_seed, 16) + int(os.environ["FABRIC_OFFSET"]), 'x').zfill(5)
         else:
             self.fabric_id = fabric_seed
@@ -81,7 +84,7 @@
         self.test_timeout = int(os.environ.get("TEST_TIMEOUT", 60 * 30))
 
         # TODO: Once LwIP bugs for tunnel are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.tap = True
             self.tap_id = "wpan0"
             return
@@ -101,7 +104,7 @@
                                                                           device_numbers=self.device_numbers)
             self.topology.createTopology()
         else:
-            print "topology set up not required"
+            print("topology set up not required")
         self.show_strace = False
 
         # Wait for a second to ensure that Weave ULA addresses passed dad
@@ -187,23 +190,23 @@
     def __process_result(self, nodeA, nodeB, value, all_data):
         success = True
         for data in all_data:
-            print "ping from " + data['client'] + " to " + nodeB + " ",
+            print("ping from " + data['client'] + " to " + nodeB + " ", end=' ')
             # value is loss_percentage, current criteria is less than or equal to 11%
             if value > 5:
                 success = False
-                print hred("Failed")
+                print(hred("Failed"))
             else:
-                print hgreen("Passed")
+                print(hgreen("Passed"))
 
             try:
                 self.assertTrue(value < 5, "%s < 5 %%" % (str(value)))
-            except AssertionError, e:
-                print str(e)
-                print "Captured experiment result:"
+            except AssertionError as e:
+                print(str(e))
+                print("Captured experiment result:")
 
-                print "Gateway Output: "
+                print("Gateway Output: ")
                 for line in data["gateway_output"].split("\n"):
-                   print "\t" + line
+                   print("\t" + line)
 
             test_results = []
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_01.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_01.py
index bbf0e65..8faa462 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_01.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M01: Stress Mutual Subscribe: Root path. Null Version. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -51,8 +53,8 @@
         wdm_next_args['test_case_name'] = ['Wdm-NestService-E01: Mutual Subscribe: Root path. Null Version. Client in initiator cancels',
                                            'Wdm-NestService-M01: Stress Mutual Subscribe: Root path. Null Version. Client in initiator cancels']
 
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E01 and M01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E01 and M01")
         super(test_weave_wdm_next_service_mutual_subscribe_01, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_02.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_02.py
index 1a864e6..e78f40d 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_02.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M02: Stress Mutual Subscribe: Root path, Null Version, Publisher in initiator Cancel
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -50,8 +52,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-E02: Mutual Subscribe: Root path, Null Version, Publisher in initiator Cancel',
                                            'Wdm-NestService-M02: Stress Mutual Subscribe: Root path, Null Version, Publisher in initiator Cancel']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E02 and M02"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E02 and M02")
         super(test_weave_wdm_next_service_mutual_subscribe_02, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_03.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_03.py
index 7875923..03f96c7 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_03.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_03.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M03: Stress Mutual Subscribe: Root path. Null Version. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -50,8 +52,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-E03: Mutual Subscribe: Root path. Null Version. Client in initiator aborts',
                                            'Wdm-NestService-M03: Stress Mutual Subscribe: Root path. Null Version. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E03 and M03"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E03 and M03")
         super(test_weave_wdm_next_service_mutual_subscribe_03, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_04.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_04.py
index b628b90..61029cb 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_04.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_04.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M04: Stress Mutual Subscribe: Root path, Null Version, Publisher in initiator Abort
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -50,8 +52,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-E04: Mutual Subscribe: Root path. Null Version. Publisher in initiator aborts',
                                            'Wdm-NestService-M04: Stress Mutual Subscribe: Root path. Null Version. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E04 and M04"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E04 and M04")
         super(test_weave_wdm_next_service_mutual_subscribe_04, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_05.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_05.py
index e88ae1c..7976c39 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_05.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_05.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M05: Stress Mutual Subscribe: Root path. Null Version. Idle. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
@@ -37,7 +39,7 @@
         wdm_next_args['wdm_option'] = "mutual_subscribe"
         wdm_next_args['final_client_status'] = 0
         wdm_next_args['enable_client_flip'] = 0
-        wdm_next_args['test_client_iterations'] = 10
+        wdm_next_args['test_client_iterations'] = 1
         wdm_next_args['client_clear_state_between_iterations'] = True
 
         wdm_next_args['client_log_check'] = [('bound mutual subscription is going away', wdm_next_args['test_client_iterations']),
@@ -49,8 +51,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-F01: Mutual Subscribe: Root path, Null Version, Idle, Client in initiator Cancel',
                                            'Wdm-NestService-M05: Stress Mutual Subscribe: Root path, Null Version, Idle, Client in initiator Cancel']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F01 and M05"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F01 and M05")
         super(test_weave_wdm_next_service_mutual_subscribe_05, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_06.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_06.py
index 2bdf7c5..6dff1c7 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_06.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_06.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M06: Stress Mutual Subscribe: Root path. Null Version. Idle. Publisher in initiator cancel.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -49,8 +51,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-F02: Mutual Subscribe: Root path. Null Version. Idle. Publisher in initiator cancels',
                                            'Wdm-NestService-M06: Stress Mutual Subscribe: Root path. Null Version. Idle. Publisher in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F02 and M06"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F02 and M06")
         super(test_weave_wdm_next_service_mutual_subscribe_06, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_07.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_07.py
index 9f19242..349c632 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_07.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_07.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M07: Stress Mutual Subscribe: Root path. Null Version. Idle. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -48,8 +50,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-F03: Mutual Subscribe: Root path. Null Version. Idle. Client in initiator aborts',
                                            'Wdm-NestService-M07: Stress Mutual Subscribe: Root path. Null Version. Idle. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F03 and M07"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F03 and M07")
         super(test_weave_wdm_next_service_mutual_subscribe_07, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_08.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_08.py
index bed400d..ba50198 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_08.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_08.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M08: Stress Mutual Subscribe: Root path. Null Version. Idle. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -47,8 +49,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-F04: Mutual Subscribe: Root path. Null Version. Idle. Publisher in initiator aborts',
                                            'Wdm-NestService-M08: Stress Mutual Subscribe: Root path. Null Version. Idle. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F04 and M08"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F04 and M08")
         super(test_weave_wdm_next_service_mutual_subscribe_08, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_09.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_09.py
index da5bf94..474b2f2 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_09.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_09.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M09: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in initiator cancels.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -47,8 +49,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-F05: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in initiator cancels',
                                            'Wdm-NestService-M09: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F05 and M09"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F05 and M09")
         super(test_weave_wdm_next_service_mutual_subscribe_09, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_10.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_10.py
index 167300d..da21421 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_10.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_10.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M10: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -48,8 +50,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-F06: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Publisher in initiator cancels',
                                            'Wdm-NestService-M10: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Publisher in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F06 and M10"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F06 and M10")
         super(test_weave_wdm_next_service_mutual_subscribe_10, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_11.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_11.py
index e8f0ba6..965bd89 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_11.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_11.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M11: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -47,8 +49,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-F07: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in initiator aborts',
                                            'Wdm-NestService-M11: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F07 and M11"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F07 and M11")
         super(test_weave_wdm_next_service_mutual_subscribe_11, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_12.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_12.py
index 53ae88f..270f4ff 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_12.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_12.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M12: Stress Mutual Susbscribe: Root path. Null Version. Mutate data in initiator. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -47,8 +49,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-F08: Mutual Susbscribe: Root path. Null Version. Mutate data in initiator. Publisher in initiator aborts',
                                            'Wdm-NestService-M12: Stress Mutual Susbscribe: Root path. Null Version. Mutate data in initiator. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F08 and M12"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F08 and M12")
         super(test_weave_wdm_next_service_mutual_subscribe_12, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_13.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_13.py
index 1dce244..5938e3e 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_13.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_13.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       M21: Stress, Mutual Subscribe: Root path. Null Version. Mutate data in initiator for X times and Y minutes. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -49,8 +51,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-M21: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator for X times and Y minutes. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test M21"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test M21")
         super(test_weave_wdm_next_service_mutual_subscribe_13, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_14.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_14.py
index c070ac9..8335010 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_14.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_14.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       M22: Stress, Mutual Subscribe: Root path. Null Version. Mutate data in initiator for X times and Y minutes. Publisher in initiator cancels.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -49,8 +51,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-M22: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator for X times and Y minutes. Publisher in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test M22"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test M22")
         super(test_weave_wdm_next_service_mutual_subscribe_14, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_15.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_15.py
index 8190210..11343c6 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_15.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_15.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       M23: Stress, Mutual Subscribe: Root path. Null Version. Mutate data in initiator for X times and Y minutes. Client in initiator abort
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -37,7 +39,7 @@
         wdm_next_args['total_client_count'] = 12 * 10
         wdm_next_args['final_client_status'] = 2
         wdm_next_args['timer_client_period'] = 5000
-        wdm_next_args['test_client_iterations'] = 1
+        wdm_next_args['test_client_iterations'] = 10
         wdm_next_args['enable_client_flip'] = 1
         wdm_next_args['timeout'] = 60 * 15 * wdm_next_args['test_client_iterations']
 
@@ -49,8 +51,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-M23: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator for X times and Y minutes. Client in initiator abort']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test M21"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test M21")
         super(test_weave_wdm_next_service_mutual_subscribe_15, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_16.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_16.py
index ec0a542..55efb2e 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_16.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_16.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       M24: Stress, Mutual Subscribe: Root path. Null Version. Mutate data in initiator for X times and Y minutes. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -49,8 +51,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-M24: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator for X times and Y minutes. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test M21"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test M21")
         super(test_weave_wdm_next_service_mutual_subscribe_16, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_17.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_17.py
index d33a350..a9de7bf 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_17.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_17.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M25: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -49,8 +51,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-I01: Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Client in initiator cancels',
                                            'Wdm-NestService-M25: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I01 and M25"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I01 and M25")
         super(test_weave_wdm_next_service_mutual_subscribe_17, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_18.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_18.py
index b610e11..1fd5916 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_18.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_18.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M26: Stress Mutual Subscribe: Root path. Initiator Continuous Events. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -49,8 +51,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-I02: Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Publisher in initiator cancels',
                                            'Wdm-NestService-M26: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Publisher in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I02 and M26"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I02 and M26")
         super(test_weave_wdm_next_service_mutual_subscribe_18, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_19.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_19.py
index 82bf065..7fa2fb0 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_19.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_19.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M27: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -50,8 +52,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-I03: Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Client in initiator aborts',
                                            'Wdm-NestService-M27: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I03 and M27"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I03 and M27")
         super(test_weave_wdm_next_service_mutual_subscribe_19, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_20.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_20.py
index 397d0d6..b899511 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_20.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_20.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M28: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -50,8 +52,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-I04: Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Publisher in initiator aborts',
                                            'Wdm-NestService-M28: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I04 and M28"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I04 and M28")
         super(test_weave_wdm_next_service_mutual_subscribe_20, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_21.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_21.py
index 1f0146b..29dab4e 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_21.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_21.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       G02: Mutual Subscribe: Multiple Iterations. Mutate data in Initiator. Client in initiator aborts. Version is kept.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -45,8 +47,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-G02: Mutual Subscribe: Multiple Iterations. Mutate data in Initiator. Client in initiator aborts. Version is kept.']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test G02"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test G02")
         super(test_weave_wdm_next_service_mutual_subscribe_21, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_22.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_22.py
index 510819b..14a1b95 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_22.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_22.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M33: Stress Mutual Subscribe: Initiator Continuous Events. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -50,8 +52,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-I09: Mutual Subscribe: Root path. Initiator Continuous Events. Mutate data in initiator. Client in initiator cancels',
                                            'Wdm-NestService-M33: Stress Mutual Subscribe: Root path. Initiator Continuous Events. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I09 and M33"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I09 and M33")
         super(test_weave_wdm_next_service_mutual_subscribe_22, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_23.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_23.py
index 64be72f..b1de00a 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_23.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_23.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M34: Stress Mutual Subscribe: Root path. Initiator Continuous Events. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -50,8 +52,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-I10: Mutual Subscribe: Root path. Initiator Continuous Events. Publisher in initiator cancels',
                                            'Wdm-NestService-M34: Stress Mutual Subscribe: Root path. Initiator Continuous Events. Publisher in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I10 and M34"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I10 and M34")
         super(test_weave_wdm_next_service_mutual_subscribe_23, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_24.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_24.py
index 80a3f49..32b7a07 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_24.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_24.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M35: Stress Mutual Subscribe: Root path. Initiator Continuous Events. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -50,8 +52,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-I11: Mutual Subscribe: Root path. Initiator Continuous Events. Publisher in initiator aborts',
                                            'Wdm-NestService-M35: Stress Mutual Subscribe: Root path. Initiator Continuous Events. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I11 and M35"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I11 and M35")
         super(test_weave_wdm_next_service_mutual_subscribe_24, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_25.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_25.py
index 67afbb4..1bff442 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_25.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_25.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M36: Stress Mutual Subscribe: Root path. Initiator Continuous Events. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -50,8 +52,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-I12: Mutual Subscribe: Root path. Initiator Continuous Events. Client in initiator aborts',
                                            'Wdm-NestService-M36: Stress Mutual Subscribe: Root path. Initiator Continuous Events. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I12 and M36"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I12 and M36")
         super(test_weave_wdm_next_service_mutual_subscribe_25, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_application_key_01.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_application_key_01.py
index 3e14ae1..7a4b3f6 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_application_key_01.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_mutual_subscribe_application_key_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       B01: Stress Mutual Subscribe: Application key: Key distribution
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -48,8 +50,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-A01: Mutual Subscribe: Application key: Key distribution',
                                            'Wdm-NestService-B01: B01: Stress Mutual Subscribe: Application key: Key distribution']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test A01 and B01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test A01 and B01")
         super(test_weave_wdm_next_service_mutual_subscribe_application_key_01, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_01_cond_OneLeaf.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_01_cond_OneLeaf.py
index 1328e03..85e364f 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_01_cond_OneLeaf.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_01_cond_OneLeaf.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       O01: Update: Client send update request to publisher, and receive status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -57,8 +59,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O01: Client creates a mutual subscription, sends one UpdateRequest to the publisher, and receives a StatusReport']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O01")
         super(test_weave_wdm_next_service_update_01_cond_OneLeaf, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_02_cond_BackToBack.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_02_cond_BackToBack.py
index 2c1386c..df0515b 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_02_cond_BackToBack.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_02_cond_BackToBack.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       O01: Update: Client send update request to publisher, and receive status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -57,8 +59,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O02: Client creates a mutual subscription, sends two conditional UpdateRequests to the publisher back-to-back']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O02"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O02")
         super(test_weave_wdm_next_service_update_02_cond_BackToBack, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_03_uncond_OneLeaf.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_03_uncond_OneLeaf.py
index edce57f..2f6ebe5 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_03_uncond_OneLeaf.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_03_uncond_OneLeaf.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       O01: Update: Client send update request to publisher, and receive status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -57,8 +59,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O03: Client creates mutual subscription, sends an unconditional UpdateRequest to publisher, and receives a StatusReport']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O03"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O03")
         super(test_weave_wdm_next_service_update_03_uncond_OneLeaf, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_04_uncond_BackToBack.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_04_uncond_BackToBack.py
index 03b26af..309919c 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_04_uncond_BackToBack.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_04_uncond_BackToBack.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       O01: Update: Client send update request to publisher, and receive status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -58,8 +60,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O02: Client creates a mutual subscription, sends two unconditional UpdateRequests to the publisher back-to-back']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O04"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O04")
         super(test_weave_wdm_next_service_update_04_uncond_BackToBack, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_05_cond_WholeDictionary.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_05_cond_WholeDictionary.py
index 7386280..1bcb905 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_05_cond_WholeDictionary.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_05_cond_WholeDictionary.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       O01: Update: Client send update request to publisher, and receive status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -57,8 +59,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O05: Client creates a mutual subscription, sends one UpdateRequest to the publisher to replace a whole dictionary, and receives a StatusReport']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O05"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O05")
         super(test_weave_wdm_next_service_update_05_cond_WholeDictionary, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_06_cond_WholeLargeDictionary.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_06_cond_WholeLargeDictionary.py
index 39651b4..5867001 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_06_cond_WholeLargeDictionary.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_06_cond_WholeLargeDictionary.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       O01: Update: Client send update request to publisher, and receive status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -61,8 +63,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O06: Client creates a mutual subscription, sends one UpdateRequest to the publisher to replace a whole dictionary, and receives a StatusReport']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O06"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O06")
         super(test_weave_wdm_next_service_update_06_cond_WholeLargeDictionary, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_07_cond_OneLeaf_multi_traits.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_07_cond_OneLeaf_multi_traits.py
index 435e57b..13f0994 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_07_cond_OneLeaf_multi_traits.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_07_cond_OneLeaf_multi_traits.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -26,6 +26,8 @@
 #           StatusReport
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -58,8 +60,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O07: Client creates a mutual subscription, sends one UpdateRequest to the publisher with 2 traits, and receives a StatusReport']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O07"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O07")
         super(test_weave_wdm_next_service_update_07_cond_OneLeaf_multi_traits, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_08_mixed_OneLeaf_multi_traits.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_08_mixed_OneLeaf_multi_traits.py
index 0a3b55a..cd38d44 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_08_mixed_OneLeaf_multi_traits.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_08_mixed_OneLeaf_multi_traits.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls Weave WDM mutual subscribe between mock device and real service.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -56,8 +58,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O08: Client creates a mutual subscription, sends one UpdateRequest to the publisher with 2 traits, one conditional and one not, and receives a StatusReport']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O08"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O08")
         super(test_weave_wdm_next_service_update_08_mixed_OneLeaf_multi_traits, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_09_mixed_SameLevelLeafs_multi_traits.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_09_mixed_SameLevelLeafs_multi_traits.py
index 7c008ac..9db7885 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_09_mixed_SameLevelLeafs_multi_traits.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_09_mixed_SameLevelLeafs_multi_traits.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls Weave WDM mutual subscribe between mock device and real service.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -58,8 +60,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O09: Client creates a mutual subscription, sends one UpdateRequest to the publisher with multiple leaves in 2 traits, and receives a StatusReport']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O09"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O09")
         super(test_weave_wdm_next_service_update_09_mixed_SameLevelLeaves_multi_traits, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_10_cond_Root_multi_traits.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_10_cond_Root_multi_traits.py
index d2508e7..9fa1bcf 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_10_cond_Root_multi_traits.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_10_cond_Root_multi_traits.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -26,6 +26,8 @@
 #           StatusReport
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -66,8 +68,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O10: Client creates a mutual subscription, sends one UpdateRequest to the publisher with 4 full traits, and receives a StatusReport']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O10"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O10")
         super(test_weave_wdm_next_service_update_10_cond_Root_multi_traits, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_11_uncond_WholeLargeDictionary.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_11_uncond_WholeLargeDictionary.py
index 68ebce3..51d48d7 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_11_uncond_WholeLargeDictionary.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_11_uncond_WholeLargeDictionary.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       O01: Update: Client send update request to publisher, and receive status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -60,8 +62,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O11: Client creates a mutual subscription, sends one UpdateRequest to the publisher to replace a whole dictionary, and receives a StatusReport']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O11"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O11")
         super(test_weave_wdm_next_service_update_11_uncond_WholeLargeDictionary, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_12_uncond_OneLeaf_BeforeSub.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_12_uncond_OneLeaf_BeforeSub.py
index 5e5595b..29ccaa7 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_12_uncond_OneLeaf_BeforeSub.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_12_uncond_OneLeaf_BeforeSub.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       O01: Update: Client send update request to publisher, and receive status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -60,8 +62,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O03: Client creates mutual subscription, sends an unconditional UpdateRequest to publisher before starting the subscription']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O12"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O12")
         super(test_weave_wdm_next_service_update_12_uncond_OneLeaf_BeforeSub, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_13_cond_ManyDictionaryItems.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_13_cond_ManyDictionaryItems.py
index 5823e30..6189de4 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_13_cond_ManyDictionaryItems.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_13_cond_ManyDictionaryItems.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       O13: Update: Client sends an update request to the publisher with a large number of DataElements.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 from weave_wdm_next_test_service_base import weave_wdm_next_test_service_base
 
@@ -60,8 +62,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__
         wdm_next_args['test_case_name'] = ['Wdm-NestService-O13: Client creates a mutual subscription, sends a conditional UpdateRequest to publisher with many dictionary items']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O13"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O13")
         super(test_weave_wdm_next_service_update_13_cond_ManyDictionaryItems, self).weave_wdm_next_test_service_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_faults.py b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_faults.py
index 9fec7b0..1fee12c 100755
--- a/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_faults.py
+++ b/src/test-apps/happy/tests/service/wdmNext/test_weave_wdm_next_service_update_faults.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #
 # This is WIP
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import unittest
@@ -431,7 +433,7 @@
                 return False
 
         wdm_next_args['test_tag'] = self.base_test_tag + "_" + str(self.num_tests) + "_" + scenario + "_" + conditionality + "_" + fault_config
-        print wdm_next_args['test_tag']
+        print(wdm_next_args['test_tag'])
         wdm_next_args['client_faults'] = fault_config
         wdm_next_args['client_update_conditionality'] = conditionality
 
@@ -500,8 +502,8 @@
 
             node = 'client'
 
-            print 'test file: ' + self.__class__.__name__
-            print "weave-wdm-next test update with faults"
+            print('test file: ' + self.__class__.__name__)
+            print("weave-wdm-next test update with faults")
             super(test_weave_wdm_next_service_update_faults, self).weave_wdm_next_test_service_base(wdm_next_args)
 
         self.num_tests = 0
@@ -516,8 +518,8 @@
         if (scenarios[0] == None):
             scenarios = gScenarios
 
-        print "scenarios: " + str(scenarios)
-        print "conditionalities: " + str(conditionalities)
+        print("scenarios: " + str(scenarios))
+        print("conditionalities: " + str(conditionalities))
 
         results = []
 
@@ -532,7 +534,7 @@
             if not self.configure_test(scenario, conditionality):
                 continue
 
-            print "Testing: " + scenario + " " + conditionality
+            print("Testing: " + scenario + " " + conditionality)
 
             self.assertTrue(len(self.wdm_next_args["client_log_check"]) > 0, "will not run a test without log checks")
 
@@ -545,12 +547,12 @@
                 num_failures = num_failures + 1
                 pass
             results.append(result + " " + scenario + " " + conditionality)
-            print results[-1]
+            print(results[-1])
             self.num_tests += 1
 
-        print "Executed " + str(self.num_tests) + " tests; " + str(num_failures) + " failures"
+        print("Executed " + str(self.num_tests) + " tests; " + str(num_failures) + " failures")
         if (results):
-            print "\n".join(results)
+            print("\n".join(results))
 
 
 
@@ -568,22 +570,22 @@
         opts, args = getopt.getopt(sys.argv[1:], "h", longopts)
 
     except getopt.GetoptError as err:
-        print help_str
-        print hred(str(err))
+        print(help_str)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print help_str
+            print(help_str)
             sys.exit(0)
         if o in ("--conditionality"):
             if not (a in gConditionalities):
-                print help_str
+                print(help_str)
                 sys.exit(0)
             gOpts["conditionality"] = a
         if o in ("--scenario"):
             if not (a in gScenarios):
-                print help_str
+                print(help_str)
                 sys.exit(0)
             gOpts["scenario"] = a
 
diff --git a/src/test-apps/happy/tests/service/wdmNext/weave_wdm_next_test_service_base.py b/src/test-apps/happy/tests/service/wdmNext/weave_wdm_next_test_service_base.py
index 119e66f..76a2318 100755
--- a/src/test-apps/happy/tests/service/wdmNext/weave_wdm_next_test_service_base.py
+++ b/src/test-apps/happy/tests/service/wdmNext/weave_wdm_next_test_service_base.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls Weave WDM between mock client and NestService Wdm Services via Tunnel
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import re
 import sys
@@ -36,6 +38,7 @@
 import Weave
 import plugins.testrail.TestrailResultOutput
 from topologies.dynamic.thread_wifi_ap_internet_configurable_topology import thread_wifi_ap_internet_configurable_topology
+from six.moves import range
 
 TEST_OPTION_QUIET = True
 DEFAULT_FABRIC_SEED = "00001"
@@ -60,7 +63,7 @@
 
         fabric_seed = os.environ.get("FABRIC_SEED", DEFAULT_FABRIC_SEED)
 
-        if "FABRIC_OFFSET" in os.environ.keys():
+        if "FABRIC_OFFSET" in list(os.environ.keys()):
             self.fabric_id = format(int(fabric_seed, 16) + int(os.environ["FABRIC_OFFSET"]), 'x').zfill(5)
         else:
             self.fabric_id = fabric_seed
@@ -84,7 +87,7 @@
         self.enable_random_fabric = int(os.environ.get("ENABLE_RANDOM_FABRIC", "0")) == 1
 
         # TODO: Once LwIP bugs for tunnel are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.tap = True
             self.tap_id = "wpan0"
             return
@@ -101,7 +104,7 @@
                                                                           enable_random_fabric=self.enable_random_fabric)
             self.topology.createTopology()
         else:
-            print "topology set up not required"
+            print("topology set up not required")
 
         self.show_strace = False
 
@@ -118,10 +121,10 @@
 
         import time
         try:
-            print "sleeping..."
+            print("sleeping...")
             #time.sleep(60*60)
         except:
-            print "sleep interrupted"
+            print("sleep interrupted")
 
 
 
@@ -222,7 +225,7 @@
             wdm_stress_diag_list.append('test_file: %s\n client_weave_id: %s\n parameters: %s\n'
                                         % (self.test_tag, data['client_weave_id'], str(self.options)))
             wdm_stress_diag_list.append(str(data['success_dic']))
-            print "weave-wdm-next %s from " % self.wdm_option + data['client'] + " to " + nodeB + " "
+            print("weave-wdm-next %s from " % self.wdm_option + data['client'] + " to " + nodeB + " ")
             if len(self.test_case_name) == 2:
                 client_delimiter = 'Current completed test iteration is'
                 client_completed_iter_list = [i + client_delimiter for i in data["client_output"].split(client_delimiter)]
@@ -312,9 +315,9 @@
             self.__output_test_result(output_file_name, output_data)
 
             if not wdm_sanity_check:
-                print "wdm_sanity_check is False\n\n" + "\n\t".join(wdm_sanity_diag_list)
+                print("wdm_sanity_check is False\n\n" + "\n\t".join(wdm_sanity_diag_list))
             if not wdm_stress_check:
-                print "wdm_stress_check is False\n\n" + "\n\t".join(wdm_stress_diag_list)
+                print("wdm_stress_check is False\n\n" + "\n\t".join(wdm_stress_diag_list))
 
 
             try:
@@ -324,13 +327,13 @@
                 success = False
                 exception_dic[data['client']] = test_results
             if success_rate < self.success_threshold:
-                print exception_dic
+                print(exception_dic)
                 success = False
         if not success:
-            print hred("Failed")
+            print(hred("Failed"))
             raise ValueError('test failure')
         else:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
 
     def __output_test_result(self, file_path, output_data):
         options = plugins.testrail.TestrailResultOutput.option()
diff --git a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_01.py b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_01.py
index a0d59a1..6b5f5df 100755
--- a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_01.py
+++ b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -26,6 +26,8 @@
 #          -- BDX versions in BDX-v0, BDX-v1, and BDX-v0&v1 interop
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import filecmp
 import itertools
 import os
@@ -41,12 +43,13 @@
 import WeaveStateUnload
 import WeaveBDX
 import WeaveUtilities
+from six.moves import range
 
 class test_weave_bdx_01(unittest.TestCase):
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -102,39 +105,39 @@
     def __process_result(self, nodeA, nodeB, value, data, direction, file_size, server_version, client_version):
 
         if direction == "download":
-            print "bdx download of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
-                  + nodeB + "(BDX-v" + str(client_version) + ") ",
+            print("bdx download of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
+                  + nodeB + "(BDX-v" + str(client_version) + ") ", end=' ')
         else:
-            print "bdx upload of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
-                  + nodeB + "(BDX-v" + str(client_version) + ") ",
+            print("bdx upload of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
+                  + nodeB + "(BDX-v" + str(client_version) + ") ", end=' ')
 
         if value:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
 
         try:
             self.assertTrue(value == True, "File Copied: " + str(value))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if not value:
             raise ValueError("Weave BDX Failed")
@@ -205,7 +208,7 @@
         receive_file_path = receive_path + "/" + file_name
 
         if not os.path.exists(receive_file_path):
-            print "A copy of a file does not exists"
+            print("A copy of a file does not exists")
             return False
 
         return filecmp.cmp(test_file_path, receive_file_path)
diff --git a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_02.py b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_02.py
index 9657e30..b37be38 100755
--- a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_02.py
+++ b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       This file calls Weave BDX-v1 test between nodes with offset parameter.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import filecmp
 import itertools
 import os
@@ -38,12 +40,13 @@
 import WeaveStateUnload
 import WeaveBDX
 import WeaveUtilities
+from six.moves import range
 
 class test_weave_bdx_02(unittest.TestCase):
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -102,37 +105,37 @@
     def __process_result(self, nodeA, nodeB, value, data, direction, copy_size):
 
         if direction == "download":
-            print "bdx download of " + str(copy_size) + "B from " + nodeA + " to " + nodeB + " ",
+            print("bdx download of " + str(copy_size) + "B from " + nodeA + " to " + nodeB + " ", end=' ')
         else:
-            print "bdx upload of " + str(copy_size) + "B from " + nodeB + " to " + nodeA + " ",
+            print("bdx upload of " + str(copy_size) + "B from " + nodeB + " to " + nodeA + " ", end=' ')
 
         if value:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
 
         try:
             self.assertTrue(value == True, "File Copied: " + str(value))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if not value:
             raise ValueError("Weave BDX Failed")
@@ -207,7 +210,7 @@
         receive_file_path = receive_path + "/" + file_name
 
         if not os.path.exists(receive_file_path):
-            print "A copy of a file does not exists"
+            print("A copy of a file does not exists")
             return False
 
         return filecmp.cmp(expected_file_path, receive_file_path)
diff --git a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_03.py b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_03.py
index 0bd604b..6a9e22c 100755
--- a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_03.py
+++ b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_03.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       This file calls Weave BDX continuous tests with different BDX versions, run twice BDX tests in a time.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import filecmp
 import itertools
 import os
@@ -38,12 +40,13 @@
 import WeaveStateUnload
 import WeaveBDX
 import WeaveUtilities
+from six.moves import range
 
 class test_weave_bdx_03(unittest.TestCase):
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -99,39 +102,39 @@
     def __process_result(self, nodeA, nodeB, value, data, direction, file_size, server_version, client_version):
 
         if direction == "download":
-            print "bdx download of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
-                  + nodeB + "(BDX-v" + str(client_version) + ") ",
+            print("bdx download of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
+                  + nodeB + "(BDX-v" + str(client_version) + ") ", end=' ')
         else:
-            print "bdx upload of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
-                  + nodeB + "(BDX-v" + str(client_version) + ") ",
+            print("bdx upload of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
+                  + nodeB + "(BDX-v" + str(client_version) + ") ", end=' ')
 
         if value:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
 
         try:
             self.assertTrue(value == True, "File Copied: " + str(value))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if not value:
             raise ValueError("Weave BDX Failed")
@@ -262,7 +265,7 @@
         receive_file_path = receive_path + "/" + file_name
 
         if not os.path.exists(receive_file_path):
-            print "A copy of a file does not exists"
+            print("A copy of a file does not exists")
             return False
 
         return filecmp.cmp(test_file_path, receive_file_path)
diff --git a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_04.py b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_04.py
index b34d008..4072c7b 100755
--- a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_04.py
+++ b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_04.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       Uses longer version of paths than those used in test_weave_bdx_01.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import filecmp
 import itertools
 import os
@@ -39,12 +41,13 @@
 import WeaveStateUnload
 import WeaveBDX
 import WeaveUtilities
+from six.moves import range
 
 class test_weave_bdx_04(unittest.TestCase):
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -101,39 +104,39 @@
     def __process_result(self, nodeA, nodeB, value, data, direction, file_size, server_version, client_version):
 
         if direction == "download":
-            print "bdx download of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
-                  + nodeB + "(BDX-v" + str(client_version) + ") ",
+            print("bdx download of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
+                  + nodeB + "(BDX-v" + str(client_version) + ") ", end=' ')
         else:
-            print "bdx upload of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
-                  + nodeB + "(BDX-v" + str(client_version) + ") ",
+            print("bdx upload of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
+                  + nodeB + "(BDX-v" + str(client_version) + ") ", end=' ')
 
         if value:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
 
         try:
             self.assertTrue(value == True, "File Copied: " + str(value))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if not value:
             raise ValueError("Weave BDX Failed")
@@ -204,7 +207,7 @@
         receive_file_path = receive_path + "/" + file_name
 
         if not os.path.exists(receive_file_path):
-            print "A copy of a file does not exists"
+            print("A copy of a file does not exists")
             return False
 
         return filecmp.cmp(test_file_path, receive_file_path)
diff --git a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_05.py b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_05.py
index 104f6a5..bb94859 100755
--- a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_05.py
+++ b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_05.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Uses a non-existent path to cover the BDX failure case with different BDX versions.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import filecmp
 import itertools
 import os
@@ -38,12 +40,13 @@
 import WeaveStateUnload
 import WeaveBDX
 import WeaveUtilities
+from six.moves import range
 
 class test_weave_bdx_05(unittest.TestCase):
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -100,39 +103,39 @@
     def __process_result(self, nodeA, nodeB, value, data, direction, file_size, server_version, client_version):
 
         if direction == "download":
-            print "bdx download of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
-                  + nodeB + "(BDX-v" + str(client_version) + ") ",
+            print("bdx download of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
+                  + nodeB + "(BDX-v" + str(client_version) + ") ", end=' ')
         else:
-            print "bdx upload of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
-                  + nodeB + "(BDX-v" + str(client_version) + ") ",
+            print("bdx upload of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
+                  + nodeB + "(BDX-v" + str(client_version) + ") ", end=' ')
 
         if value:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
 
         try:
             self.assertTrue(value, "File Copied: " + str(value))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if not value:
             raise ValueError("Weave BDX Failed")
@@ -203,7 +206,7 @@
         receive_file_path = receive_path + "/" + file_name
 
         if not os.path.exists(receive_file_path):
-            print "A copy of a file does not exists"
+            print("A copy of a file does not exists")
             return False
 
         return filecmp.cmp(test_file_path, receive_file_path)
diff --git a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_faults_01.py b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_faults_01.py
index 99be2dd..ee57714 100755
--- a/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_faults_01.py
+++ b/src/test-apps/happy/tests/standalone/bdx/test_weave_bdx_faults_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls Weave BDX between nodes using fault injection to test failure handling
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import filecmp
 import itertools
 import os
@@ -40,6 +42,8 @@
 import WeaveStateUnload
 import WeaveBDX
 import WeaveUtilities
+from six.moves import map
+from six.moves import range
 
 gFaultopts = WeaveUtilities.FaultInjectionOptions()
 gOptions = {"direction": None, "versions": None}
@@ -85,7 +89,7 @@
             bdx_version = [0, 1]
             pairs_of_versions = list(itertools.product(bdx_version, bdx_version))
         else:
-            pairs_of_versions = [map(int, gOptions["versions"].split("_"))]
+            pairs_of_versions = [list(map(int, gOptions["versions"].split("_")))]
 
 
         directions = [ gOptions["direction"] ]
@@ -113,17 +117,17 @@
 
                         for fault_config in fault_configs:
                             test_tag = "_" + direction + "_v" + str(version[0]) + "_v" + str(version[1]) + "_" + str(self.test_num) + "_" + node + "_" + fault_config
-                            print test_tag
+                            print(test_tag)
                             failed = self.__weave_bdx(direction, file_size, version[0], version[1], num_iterations = 3, faults = {node: fault_config}, test_tag = test_tag)
                             if failed:
                                 num_failed_tests += 1
                                 failed_tests.append(test_tag)
 
-        print "executed %d cases" % self.test_num
-        print "failed %d cases:" % num_failed_tests
+        print("executed %d cases" % self.test_num)
+        print("failed %d cases:" % num_failed_tests)
         if num_failed_tests > 0:
             for failed_test in failed_tests:
-                print "    " + failed_test
+                print("    " + failed_test)
             raise ValueError("Fix it!")
                    
 
@@ -176,22 +180,22 @@
     def __process_result(self, nodeA, nodeB, value, data, direction, file_size, server_version, client_version, faults):
 
         if direction == "download":
-            print "bdx download of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
-                  + nodeB + "(BDX-v" + str(client_version) + ") ",
+            print("bdx download of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
+                  + nodeB + "(BDX-v" + str(client_version) + ") ", end=' ')
         else:
-            print "bdx upload of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
-                  + nodeB + "(BDX-v" + str(client_version) + ") ",
+            print("bdx upload of " + str(file_size) + "B from " + nodeA + "(BDX-v" + str(server_version) + ") to "\
+                  + nodeB + "(BDX-v" + str(client_version) + ") ", end=' ')
 
         if faults.get('server') != None:
-            print "server fault: " + faults['server'] + " "
+            print("server fault: " + faults['server'] + " ")
 
         if faults.get('client') != None:
-            print "client fault: " + faults['client'] + " "
+            print("client fault: " + faults['client'] + " ")
 
         if value:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
 
         failed = not value
 
@@ -204,7 +208,7 @@
         receive_file_path = receive_path + "/" + file_name
 
         if not os.path.exists(receive_file_path):
-            print "A copy of a file does not exists"
+            print("A copy of a file does not exists")
             return False
 
         return filecmp.cmp(test_file_path, receive_file_path)
@@ -255,15 +259,15 @@
         opts, args = getopt.getopt(sys.argv[1:], "h", longopts)
 
     except getopt.GetoptError as err:
-        print help_str
-        print hred(str(err))
+        print(help_str)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     opts = gFaultopts.process_opts(opts)
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print help_str
+            print(help_str)
             sys.exit(0)
 
         elif o in ("--versions"):
@@ -272,7 +276,7 @@
             if a in gDirections:
                 gOptions["direction"] = a
             else:
-                print help_str
+                print(help_str)
                 sys.exit(1)
 
     sys.argv = [sys.argv[0]]
diff --git a/src/test-apps/happy/tests/standalone/con_tunnel/test_weave_con_tunnel_01.py b/src/test-apps/happy/tests/standalone/con_tunnel/test_weave_con_tunnel_01.py
index 9b5c99d..a259315 100755
--- a/src/test-apps/happy/tests/standalone/con_tunnel/test_weave_con_tunnel_01.py
+++ b/src/test-apps/happy/tests/standalone/con_tunnel/test_weave_con_tunnel_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls WeaveConnectionTunnel test among nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -40,7 +42,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -78,12 +80,12 @@
 
 
     def __process_result(self, nodeA, nodeB, nodeC, value):
-        print "connection tunnel test among Agent:" + nodeA + ", Source:" + nodeB + ", Destination:" + nodeC
+        print("connection tunnel test among Agent:" + nodeA + ", Source:" + nodeB + ", Destination:" + nodeC)
 
         if value:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
             raise ValueError("Weave Connection Tunnel Test Failed")
 
 
diff --git a/src/test-apps/happy/tests/standalone/dd/test_weave_dd_01.py b/src/test-apps/happy/tests/standalone/dd/test_weave_dd_01.py
index 8b96173..7796cc2 100755
--- a/src/test-apps/happy/tests/standalone/dd/test_weave_dd_01.py
+++ b/src/test-apps/happy/tests/standalone/dd/test_weave_dd_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,7 @@
 #       server  ----> client (identify response)
 #
 
+from __future__ import absolute_import
 import itertools
 import os
 import unittest
@@ -47,7 +48,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
 
diff --git a/src/test-apps/happy/tests/standalone/echo/test_weave_echo_01.py b/src/test-apps/happy/tests/standalone/echo/test_weave_echo_01.py
index 3ca8a62..218aa8f 100755
--- a/src/test-apps/happy/tests/standalone/echo/test_weave_echo_01.py
+++ b/src/test-apps/happy/tests/standalone/echo/test_weave_echo_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #       Copyright (c) 2015-2017  Nest Labs, Inc.
 #       All rights reserved.
@@ -21,6 +21,8 @@
 #       Calls Weave Echo between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -37,7 +39,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -78,7 +80,7 @@
 
         for pair in pairs_of_nodes:
             if pair[0] == pair[1]:
-                print "Skip Echo test on client and server running on the same node."
+                print("Skip Echo test on client and server running on the same node.")
                 continue
 
             value, data = self.__run_ping_test_between(pair[0], pair[1])
@@ -86,35 +88,35 @@
 
 
     def __process_result(self, nodeA, nodeB, value, data):
-        print "ping from " + nodeA + " to " + nodeB + " ",
+        print("ping from " + nodeA + " to " + nodeB + " ", end=' ')
 
         if value > 0:
-            print hred("Failed")
+            print(hred("Failed"))
         else:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
 
         try:
             self.assertTrue(value == 0, "%s > 0 %%" % (str(value)))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data[0]["client_output"].split("\n"):
-               print "\t" + line
+               print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data[0]["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace == True:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data[0]["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data[0]["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if value > 0:
             raise ValueError("Weave Ping Failed")
diff --git a/src/test-apps/happy/tests/standalone/echo/test_weave_echo_02.py b/src/test-apps/happy/tests/standalone/echo/test_weave_echo_02.py
index ad3e8fe..12e73ee 100755
--- a/src/test-apps/happy/tests/standalone/echo/test_weave_echo_02.py
+++ b/src/test-apps/happy/tests/standalone/echo/test_weave_echo_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls Weave Echo between nodes, using authentication and encryption
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -72,62 +74,62 @@
         # udp + CASE                               nodeA,    nodeB,    udp,  tcp,   wrmp,  pase, case, groupkey, test_tag
         # Note that CASE will use WRMP if it is compiled. 
         # Only the echo request will use pure UDP
-        print "start UDP ping with CASE:"
+        print("start UDP ping with CASE:")
         value, data = self.__run_ping_test_between("node01", "node02", True, False, False, False, True, False, "_CASE_UDP")
         self.__process_result("node01", "node02", value, data)
 
         # TCP + CASE
-        print "start TCP ping with CASE:"
+        print("start TCP ping with CASE:")
         value, data = self.__run_ping_test_between("node01", "node02", False, True, False, False, True, False, "_CASE_TCP")
         self.__process_result("node01", "node02", value, data)
 
         # TCP + PASE
-        print "start TCP ping with PASE:"
+        print("start TCP ping with PASE:")
         value, data = self.__run_ping_test_between("node01", "node02", False, True, False, True, False, False, "_PASE_TCP")
         self.__process_result("node01", "node02", value, data)
 
         # WRMP + group key
-        print "start WRMP ping with group key encryption:"
+        print("start WRMP ping with group key encryption:")
         value, data = self.__run_ping_test_between("node01", "node02", True, False, True,  False, False, True, "_WRMP_GROUPKEY")
         self.__process_result("node01", "node02", value, data)
 
         # UDP + group key
-        print "start UDP ping with group key encryption:"
+        print("start UDP ping with group key encryption:")
         value, data = self.__run_ping_test_between("node01", "node02", True, False, False,  False, False, True, "_UDP_GROUPKEY")
         self.__process_result("node01", "node02", value, data)
 
 
 
     def __process_result(self, nodeA, nodeB, value, data):
-        print "ping from " + nodeA + " to " + nodeB + " ",
+        print("ping from " + nodeA + " to " + nodeB + " ", end=' ')
 
         if value > 0:
-            print hred("Failed")
+            print(hred("Failed"))
         else:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
 
         try:
             self.assertTrue(value == 0, "%s > 0 %%" % (str(value)))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-               print "\t" + line
+               print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace == True:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if value > 0:
             raise ValueError("Weave Ping Failed")
diff --git a/src/test-apps/happy/tests/standalone/echo/test_weave_echo_03.py b/src/test-apps/happy/tests/standalone/echo/test_weave_echo_03.py
index 05345e6..506153d 100755
--- a/src/test-apps/happy/tests/standalone/echo/test_weave_echo_03.py
+++ b/src/test-apps/happy/tests/standalone/echo/test_weave_echo_03.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls Weave Echo between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -39,7 +41,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -69,41 +71,41 @@
 
 
     def test_weave_echo(self):
-        print "start WRMP ping:"
+        print("start WRMP ping:")
         value, data = self.__run_ping_test_between("node01", "node02")
         self.__process_result("node01", "node02", value, data)
 
 
     def __process_result(self, nodeA, nodeB, value, data):
-        print "ping from " + nodeA + " to " + nodeB + " ",
+        print("ping from " + nodeA + " to " + nodeB + " ", end=' ')
 
         if value > 0:
-            print hred("Failed")
+            print(hred("Failed"))
         else:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
 
         try:
             self.assertTrue(value == 0, "%s > 0 %%" % (str(value)))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data[0]["client_output"].split("\n"):
-               print "\t" + line
+               print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data[0]["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace == True:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data[0]["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data[0]["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if value > 0:
             raise ValueError("Weave Ping Failed")
diff --git a/src/test-apps/happy/tests/standalone/echo/test_weave_echo_secmgr_faults.py b/src/test-apps/happy/tests/standalone/echo/test_weave_echo_secmgr_faults.py
index a6a5b52..4f4d0a4 100755
--- a/src/test-apps/happy/tests/standalone/echo/test_weave_echo_secmgr_faults.py
+++ b/src/test-apps/happy/tests/standalone/echo/test_weave_echo_secmgr_faults.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls Weave Echo between nodes, with case and fault-injection
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import getopt
@@ -83,7 +85,7 @@
         if groupkey:
             auth = "group_key" 
 
-        print "start " + transport + " ping with " + auth + ":"
+        print("start " + transport + " ping with " + auth + ":")
         value, data = self.__run_ping_test_between("node01", "node02", wrmp, auth)
         self.__process_result("node01", "node02", value, data)
 
@@ -102,7 +104,7 @@
 
             for fault_config in fault_configs:
                 test_tag = "_" + auth + "_" + transport + "_" + str(num_tests) + "_" + node + "_" + fault_config
-                print "tag: " + test_tag
+                print("tag: " + test_tag)
                 # We need to run this with 3 iterations, since when the server restarts at the end of the first one
                 # sometimes the client fails to reconnect and therefore the second iteration fails as well
                 value, data = self.__run_ping_test_between("node01", "node02", wrmp, auth, num_iterations = 3, faults = {node: fault_config}, test_tag = test_tag)
@@ -111,24 +113,24 @@
                     failed_tests.append(test_tag)
                 num_tests += 1
 
-        print "executed %d cases" % num_tests
-        print "failed %d cases:" % num_failed_tests
+        print("executed %d cases" % num_tests)
+        print("failed %d cases:" % num_failed_tests)
         if num_failed_tests > 0:
             for failed in failed_tests:
-                print "    " + failed
+                print("    " + failed)
         self.assertEqual(num_failed_tests, 0, "Something failed")
 
 
     def __process_result(self, nodeA, nodeB, value, data):
-        print "ping from " + nodeA + " to " + nodeB + " ",
+        print("ping from " + nodeA + " to " + nodeB + " ", end=' ')
 
         if value > 0:
-            print hred("Failed")
+            print(hred("Failed"))
         else:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
 
         if data["other_failure"] > 0:
-            print hred("other failure detected")
+            print(hred("other failure detected"))
 
         failed = False
         if value > 0 or data["other_failure"]:
@@ -189,15 +191,15 @@
         opts, args = getopt.getopt(sys.argv[1:], "h", longopts)
 
     except getopt.GetoptError as err:
-        print help_str
-        print hred(str(err))
+        print(help_str)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     opts = gFaultopts.process_opts(opts)
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print help_str
+            print(help_str)
             sys.exit(0)
 
         elif o in ("--wrmp"):
@@ -213,7 +215,7 @@
 
     if gOptions["group_key"] and not gOptions["wrmp"]:
         msg = "--group-key requires --wrmp"
-        print hred(msg)
+        print(hred(msg))
         sys.exit(-1)
 
     sys.argv = [sys.argv[0]]
diff --git a/src/test-apps/happy/tests/standalone/heartbeat/test_weave_heartbeat_01.py b/src/test-apps/happy/tests/standalone/heartbeat/test_weave_heartbeat_01.py
index 6609faa..c285b55 100755
--- a/src/test-apps/happy/tests/standalone/heartbeat/test_weave_heartbeat_01.py
+++ b/src/test-apps/happy/tests/standalone/heartbeat/test_weave_heartbeat_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls Weave Heartbeat between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -39,7 +41,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -80,7 +82,7 @@
 
         for pair in pairs_of_nodes:
             if pair[0] == pair[1]:
-                print "Skip Heartbeat test on client and server running on the same node."
+                print("Skip Heartbeat test on client and server running on the same node.")
                 continue
 
             value, data = self.__run_heartbeat_test_between(pair[0], pair[1])
@@ -88,35 +90,35 @@
 
 
     def __process_result(self, nodeA, nodeB, value, data):
-        print "heartbeat from " + nodeA + " to " + nodeB + " ",
+        print("heartbeat from " + nodeA + " to " + nodeB + " ", end=' ')
 
         if value == self.count:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
 
         try:
             self.assertTrue(value == self.count, "%d != %d" % (value, self.count))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-               print "\t" + line
+               print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace == True:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if value != self.count:
             raise ValueError("Weave Heartbeat Failed")
diff --git a/src/test-apps/happy/tests/standalone/inet/test_inet_01.py b/src/test-apps/happy/tests/standalone/inet/test_inet_01.py
index 93ea4b3..ef1649e 100755
--- a/src/test-apps/happy/tests/standalone/inet/test_inet_01.py
+++ b/src/test-apps/happy/tests/standalone/inet/test_inet_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2018-2019 Google LLC.
@@ -23,6 +23,8 @@
 #       Calls Weave Inet test between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -37,7 +39,7 @@
 
 class test_weave_inet_01(unittest.TestCase):
     def setUp(self):
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.using_lwip = True
         else:
             self.using_lwip = False
@@ -163,12 +165,12 @@
 
 
     def __process_result(self, sender, receiver, interface, network, transport, prefix, tx_size, rx_tx_length, value, data):
-        print "Inet test using %sIPv%s w/ device interface %s (w/%s LwIP) %s with %u/%u size/length:" % ("UDP/" if transport == "udp" else "TCP/" if transport == "tcp" else "", network, "<none>" if interface == None else interface, "" if self.using_lwip else "o", sender + " to " + receiver + " w/ prefix " + prefix, tx_size, rx_tx_length),
+        print("Inet test using %sIPv%s w/ device interface %s (w/%s LwIP) %s with %u/%u size/length:" % ("UDP/" if transport == "udp" else "TCP/" if transport == "tcp" else "", network, "<none>" if interface == None else interface, "" if self.using_lwip else "o", sender + " to " + receiver + " w/ prefix " + prefix, tx_size, rx_tx_length), end=' ')
 
         if value:
-            print hgreen("PASSED")
+            print(hgreen("PASSED"))
         else:
-            print hred("FAILED")
+            print(hred("FAILED"))
             raise ValueError("Weave Inet Test Failed")
 
 
diff --git a/src/test-apps/happy/tests/standalone/inet/test_inet_dns_01.py b/src/test-apps/happy/tests/standalone/inet/test_inet_dns_01.py
index 6e0c7b9..2d4cfb9 100755
--- a/src/test-apps/happy/tests/standalone/inet/test_inet_dns_01.py
+++ b/src/test-apps/happy/tests/standalone/inet/test_inet_dns_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -22,6 +22,8 @@
 #    @file
 #       Calls Weave Inet test between nodes.
 #
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -38,7 +40,7 @@
 
 class test_inet_dns(unittest.TestCase):
     def setUp(self):
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.using_lwip = True
             topology_shell_script = os.path.dirname(os.path.realpath(__file__)) + \
             "/topology/two_nodes_on_tap_wifi.sh"
@@ -65,9 +67,9 @@
         process result returned from inet dns test template
         """
         if value:
-            print hgreen("PASSED")
+            print(hgreen("PASSED"))
         else:
-            print hred("FAILED")
+            print(hred("FAILED"))
             raise ValueError("Weave Inet DNS Test Failed")
 
     def __run_inet_dns_test(self, node):
diff --git a/src/test-apps/happy/tests/standalone/inet/test_inet_multicast_01.py b/src/test-apps/happy/tests/standalone/inet/test_inet_multicast_01.py
index 6d3eb70..85d092d 100755
--- a/src/test-apps/happy/tests/standalone/inet/test_inet_multicast_01.py
+++ b/src/test-apps/happy/tests/standalone/inet/test_inet_multicast_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2018-2019 Google LLC.
@@ -22,6 +22,8 @@
 #       Calls Weave Inet Multicast test among sender and receiver nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -36,7 +38,7 @@
 
 class test_weave_inet_multicast_01(unittest.TestCase):
     def setUp(self):
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.using_lwip = True
         else:
             self.using_lwip = False
@@ -220,12 +222,12 @@
     def __process_result(self, configuration, interface, network, transport, value, data):
         nodes = len(configuration['sender']) + len(configuration['receivers'])
 
-        print "Inet multicast test using %sIPv%s w/ device interface: %s (w/%s LwIP) with %u nodes:" % ("UDP/" if transport == "udp" else "", network, "<none>" if interface == None else interface, "" if self.using_lwip else "o", nodes),
+        print("Inet multicast test using %sIPv%s w/ device interface: %s (w/%s LwIP) with %u nodes:" % ("UDP/" if transport == "udp" else "", network, "<none>" if interface == None else interface, "" if self.using_lwip else "o", nodes), end=' ')
 
         if value:
-            print hgreen("PASSED")
+            print(hgreen("PASSED"))
         else:
-            print hred("FAILED")
+            print(hred("FAILED"))
             raise ValueError("Weave Inet Multicast Test Failed")
 
 
diff --git a/src/test-apps/happy/tests/standalone/ip_comms/test_weave_udp.py b/src/test-apps/happy/tests/standalone/ip_comms/test_weave_udp.py
index 0605b13..196b278 100755
--- a/src/test-apps/happy/tests/standalone/ip_comms/test_weave_udp.py
+++ b/src/test-apps/happy/tests/standalone/ip_comms/test_weave_udp.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #       Copyright (c) 2015-2017  Nest Labs, Inc.
 #       All rights reserved.
@@ -21,6 +21,7 @@
 #       Calls Weave Echo between nodes.
 #
 
+from __future__ import absolute_import
 import os
 import sys
 import unittest
diff --git a/src/test-apps/happy/tests/standalone/key_export/test_weave_key_export_01.py b/src/test-apps/happy/tests/standalone/key_export/test_weave_key_export_01.py
index 5820121..b541f21 100755
--- a/src/test-apps/happy/tests/standalone/key_export/test_weave_key_export_01.py
+++ b/src/test-apps/happy/tests/standalone/key_export/test_weave_key_export_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -22,6 +22,8 @@
 #       Calls Key Export Protocol between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -73,48 +75,48 @@
             return
 
         #                                                nodeA,    nodeB,    udp,  tcp,   wrmp,  key_id,    sign_msfs, test_tag
-        print "Start Key Export over UDP"
+        print("Start Key Export over UDP")
         value, data = self.__run_key_export_test_between("node01", "node02", True, False, False, 0x00010400, True, "_KEY_EXPORT_UDP")
         self.__process_result("node01", "node02", value, data)
 
-        print "Start Key Export over UDP + WRMP"
+        print("Start Key Export over UDP + WRMP")
         value, data = self.__run_key_export_test_between("node01", "node02", True, False, True, 0x00010400, True, "_KEY_EXPORT_UDP_WRMP")
         self.__process_result("node01", "node02", value, data)
 
-        print "Start Key Export over TCP"
+        print("Start Key Export over TCP")
         value, data = self.__run_key_export_test_between("node01", "node02", False, True, False, 0x00010400, True, "_KEY_EXPORT_TCP")
         self.__process_result("node01", "node02", value, data)
 
     def __process_result(self, nodeA, nodeB, value, data):
-        print " " + nodeA + " requested key export from " + nodeB + " ",
+        print(" " + nodeA + " requested key export from " + nodeB + " ", end=' ')
 
         if value > 0:
-            print hred("Failed")
+            print(hred("Failed"))
         else:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
 
         try:
             self.assertTrue(value == 0, "%s > 0 %%" % (str(value)))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-               print "\t" + line
+               print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace == True:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if value > 0:
             raise ValueError("Weave Key Export Failed")
diff --git a/src/test-apps/happy/tests/standalone/key_export/test_weave_key_export_faults.py b/src/test-apps/happy/tests/standalone/key_export/test_weave_key_export_faults.py
index a9116ae..aa53cc6 100755
--- a/src/test-apps/happy/tests/standalone/key_export/test_weave_key_export_faults.py
+++ b/src/test-apps/happy/tests/standalone/key_export/test_weave_key_export_faults.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -22,6 +22,8 @@
 #       Calls Weave Key Export between nodes with fault-injection.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import getopt
@@ -81,7 +83,7 @@
         wrmp = gOptions['wrmp']
         transport = "WRMP" if wrmp else "TCP"
 
-        print "Start Key Export over " + transport + ":"
+        print("Start Key Export over " + transport + ":")
         value, data = self.__run_key_export_test_between("node01", "node02", wrmp)
         self.__process_result("node01", "node02", value, data)
 
@@ -100,7 +102,7 @@
 
             for fault_config in fault_configs:
                 test_tag = "_" + transport + "_" + str(num_tests) + "_" + node + "_" + fault_config
-                print "tag: " + test_tag
+                print("tag: " + test_tag)
                 # We need to run this with 3 iterations, since when the server restarts at the end of the first one
                 # sometimes the client fails to reconnect and therefore the second iteration fails as well
                 value, data = self.__run_key_export_test_between("node01", "node02", wrmp, num_iterations = 3, faults = {node: fault_config}, test_tag = test_tag)
@@ -109,37 +111,37 @@
                     failed_tests.append(test_tag)
                 num_tests += 1
 
-        print "executed %d cases" % num_tests
-        print "failed %d cases:" % num_failed_tests
+        print("executed %d cases" % num_tests)
+        print("failed %d cases:" % num_failed_tests)
         if num_failed_tests > 0:
             for failed in failed_tests:
-                print "    " + failed
+                print("    " + failed)
         self.assertEqual(num_failed_tests, 0, "Something failed")
 
 
     def __process_result(self, nodeA, nodeB, value, data):
-        print "" + nodeA + " requested key export from " + nodeB + " ",
+        print("" + nodeA + " requested key export from " + nodeB + " ", end=' ')
 
         if value > 0:
-            print hred("Failed")
+            print(hred("Failed"))
         else:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
 
         if data["other_failure"] > 0:
-            print hred("other failure detected")
+            print(hred("other failure detected"))
 
         failed = False
         if value > 0 or data["other_failure"]:
             failed = True
 
         if self.show_output == True:
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
         return failed
 
@@ -184,15 +186,15 @@
         opts, args = getopt.getopt(sys.argv[1:], "h", longopts)
 
     except getopt.GetoptError as err:
-        print help_str
-        print hred(str(err))
+        print(help_str)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     opts = gFaultopts.process_opts(opts)
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print help_str
+            print(help_str)
             sys.exit(0)
 
         elif o in ("--wrmp"):
@@ -202,12 +204,12 @@
 
     if (not gOptions["tcp"]) and (not gOptions["wrmp"]):
         msg = "At least one of --tcp or --wrmp options should be set"
-        print hred(msg)
+        print(hred(msg))
         sys.exit(-1)
 
     if gOptions["tcp"] and gOptions["wrmp"]:
         msg = "--tcp and --wrmp are mutually exclusive"
-        print hred(msg)
+        print(hred(msg))
         sys.exit(-1)
 
     sys.argv = [sys.argv[0]]
diff --git a/src/test-apps/happy/tests/standalone/messagelayer/test_weave_messagelayer_01.py b/src/test-apps/happy/tests/standalone/messagelayer/test_weave_messagelayer_01.py
index 522398f..6b2a0a1 100755
--- a/src/test-apps/happy/tests/standalone/messagelayer/test_weave_messagelayer_01.py
+++ b/src/test-apps/happy/tests/standalone/messagelayer/test_weave_messagelayer_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #      Calls Weave MessageLayer test between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -39,7 +41,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -79,16 +81,16 @@
 
 
     def __process_result(self, nodeA, nodeB, value, data, isTCP):
-        print "messagelayer test between " + nodeA + " and " + nodeB + " ",
+        print("messagelayer test between " + nodeA + " and " + nodeB + " ", end=' ')
         if isTCP:
-            print "via TCP"
+            print("via TCP")
         else:
-            print "via UDP"
+            print("via UDP")
 
         if value:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
             raise ValueError("Weave MessageLayer Test Failed")
 
 
diff --git a/src/test-apps/happy/tests/standalone/pairing/test_weave_ble_01.py b/src/test-apps/happy/tests/standalone/pairing/test_weave_ble_01.py
index 33752bc..16a30e2 100755
--- a/src/test-apps/happy/tests/standalone/pairing/test_weave_ble_01.py
+++ b/src/test-apps/happy/tests/standalone/pairing/test_weave_ble_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #       Copyright (c) 2015-2017  Nest Labs, Inc.
 #       All rights reserved.
@@ -21,6 +21,8 @@
 #       Calls Weave BLE between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -80,15 +82,15 @@
         passed = result_list[0]
 
         if not passed:
-            print "Captured experiment result:"
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in client_output.split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in server_output.split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             raise ValueError("The test failed")
 
diff --git a/src/test-apps/happy/tests/standalone/pairing/test_weave_pairing_01.py b/src/test-apps/happy/tests/standalone/pairing/test_weave_pairing_01.py
index 0ac12e7..22f2944 100755
--- a/src/test-apps/happy/tests/standalone/pairing/test_weave_pairing_01.py
+++ b/src/test-apps/happy/tests/standalone/pairing/test_weave_pairing_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls Weave pairing between the mobile and device.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import unittest
 import set_test_path
@@ -38,7 +40,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -69,8 +71,8 @@
 
     def test_weave_pairing(self):
         # TODO: Once LwIP bugs are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
-            print hred("WARNING: Test skipped due to LwIP-based network cofiguration!")            
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+            print(hred("WARNING: Test skipped due to LwIP-based network cofiguration!"))            
             return
 
         # topology has nodes: node01(mobile), node02(device) and node03
@@ -84,15 +86,15 @@
         passed = result_list[0]
 
         if not passed:
-            print "Captured experiment result:"
+            print("Captured experiment result:")
 
-            print "Mobile Output: "
+            print("Mobile Output: ")
             for line in mobiles_output[0].split("\n"):
-               print "\t" + line
+               print("\t" + line)
 
-            print "Device Output: "
+            print("Device Output: ")
             for line in devices_output[0].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             raise ValueError("The test failed")
 
diff --git a/src/test-apps/happy/tests/standalone/servicedir/test_service_directory_01.py b/src/test-apps/happy/tests/standalone/servicedir/test_service_directory_01.py
index 372575e..94c8876 100755
--- a/src/test-apps/happy/tests/standalone/servicedir/test_service_directory_01.py
+++ b/src/test-apps/happy/tests/standalone/servicedir/test_service_directory_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Run Weave Service Directory Profile between a client and service.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -43,7 +45,7 @@
 
 class test_service_directory_01(unittest.TestCase):
     def setUp(self):
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.use_lwip = True
             topology_shell_script = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/thread_wifi_on_tap_ap_service.sh"
@@ -91,7 +93,7 @@
 
                 for fault_config in fault_configs:
                     test_tag = "_" + str(num_tests) + "_" + node + "_" + fault_config
-                    print "tag: " + test_tag
+                    print("tag: " + test_tag)
                     value, data = self.__run_service_directory_test_between("BorderRouter", "cloud", num_iterations = 3,
                                                                             faults = {node: fault_config}, test_tag = test_tag)
                     if not value:
@@ -100,11 +102,11 @@
                         self.assertTrue(value);
                     num_tests += 1
 
-        print "executed %d cases" % num_tests
-        print "failed %d cases:" % num_failed_tests
+        print("executed %d cases" % num_tests)
+        print("failed %d cases:" % num_failed_tests)
         if num_failed_tests > 0:
             for failed in failed_tests:
-                print "    " + failed
+                print("    " + failed)
         self.assertEqual(num_failed_tests, 0, "Something failed")
 
 
@@ -150,15 +152,15 @@
         opts, args = getopt.getopt(sys.argv[1:], "h", longopts)
 
     except getopt.GetoptError as err:
-        print help_str
-        print hred(str(err))
+        print(help_str)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     opts = gFaultopts.process_opts(opts)
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print help_str
+            print(help_str)
             sys.exit(0)
 
         elif o in ("--fault-injection"):
diff --git a/src/test-apps/happy/tests/standalone/swu/test_weave_swu_01.py b/src/test-apps/happy/tests/standalone/swu/test_weave_swu_01.py
index 3107ec7..da71e5e 100755
--- a/src/test-apps/happy/tests/standalone/swu/test_weave_swu_01.py
+++ b/src/test-apps/happy/tests/standalone/swu/test_weave_swu_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,7 @@
 #           client ====> server (image response)
 #
 
+from __future__ import absolute_import
 import os
 import unittest
 import set_test_path
@@ -39,12 +40,13 @@
 import WeaveTunnelStart
 import WeaveTunnelStop
 import WeaveUtilities
+from six.moves import range
 
 class test_weave_swu_01(unittest.TestCase):
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
diff --git a/src/test-apps/happy/tests/standalone/swu/test_weave_swu_02.py b/src/test-apps/happy/tests/standalone/swu/test_weave_swu_02.py
index 314f0b3..a480edd 100755
--- a/src/test-apps/happy/tests/standalone/swu/test_weave_swu_02.py
+++ b/src/test-apps/happy/tests/standalone/swu/test_weave_swu_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -26,6 +26,7 @@
 #           client ===> server (image response)
 #
 
+from __future__ import absolute_import
 import os
 import unittest
 import set_test_path
@@ -40,12 +41,13 @@
 import WeaveTunnelStart
 import WeaveTunnelStop
 import WeaveUtilities
+from six.moves import range
 
 class test_weave_swu_01(unittest.TestCase):
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
diff --git a/src/test-apps/happy/tests/standalone/time/test_weave_time_01.py b/src/test-apps/happy/tests/standalone/time/test_weave_time_01.py
index a2c98b5..81f3c93 100755
--- a/src/test-apps/happy/tests/standalone/time/test_weave_time_01.py
+++ b/src/test-apps/happy/tests/standalone/time/test_weave_time_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -27,6 +27,8 @@
 #       Also available: fault-injection (enabled via command-line option)
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import getopt
@@ -49,7 +51,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -143,8 +145,8 @@
             fault_configs = gFaultOpts.generate_fault_config_list(node, output_logs[node], restart) 
 
             for fault_config in fault_configs:
-                test_tag = "_" + "_".join([str(x) for x in num_tests, node, fault_config])
-                print "tag: ", test_tag
+                test_tag = "_" + "_".join([str(x) for x in (num_tests, node, fault_config)])
+                print("tag: ", test_tag)
 
                 if self.use_plaid:
                     # print "starting plaid server"
@@ -165,24 +167,24 @@
 
                 num_tests += 1
 
-        print "executed %d cases" % num_tests
-        print "failed %d cases:" % num_failed_tests
+        print("executed %d cases" % num_tests)
+        print("failed %d cases:" % num_failed_tests)
         if num_failed_tests > 0:
             for failed in failed_tests:
-                print "    " + failed
+                print("    " + failed)
         self.assertEqual(num_failed_tests, 0, "Something failed")
 
 
     def __process_result(self, nodeA, nodeB, nodeC, mode, value):
-        print "time sync test among client:" + nodeA + \
+        print("time sync test among client:" + nodeA + \
               ", coordinator:" + nodeB + ", server:" + nodeC + \
-              ", sync mode:" + mode
+              ", sync mode:" + mode)
 
         if value:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
             failed = False
         else:
-            print hred("Failed")
+            print(hred("Failed"))
             failed = True
 
         return failed
@@ -239,15 +241,15 @@
         opts, args = getopt.getopt(sys.argv[1:], "hfm:", longopts)
 
     except getopt.GetoptError as err:
-        print help_str
-        print hred(str(err))
+        print(help_str)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     opts = gFaultOpts.process_opts(opts)
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print help_str
+            print(help_str)
             sys.exit(0)
 
         elif o in ("-m", "--syncmode"):
diff --git a/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_01.py b/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_01.py
index a552374..94f6c0a 100755
--- a/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_01.py
+++ b/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #       Copyright (c) 2015-2017  Nest Labs, Inc.
 #       All rights reserved.
@@ -21,6 +21,7 @@
 #       Calls Weave Tunnel between nodes.
 #
 
+from __future__ import absolute_import
 import itertools
 import os
 import sys
@@ -39,7 +40,7 @@
 
 class test_weave_tunnel_01(unittest.TestCase):
     def setUp(self):
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.use_lwip = True
             topology_shell_script = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/thread_wifi_on_tap_ap_service.sh"
diff --git a/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_02.py b/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_02.py
index 514b042..6b866d6 100755
--- a/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_02.py
+++ b/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #       Copyright (c) 2015-2017  Nest Labs, Inc.
 #       All rights reserved.
@@ -21,6 +21,8 @@
 #       Calls Weave Tunnel between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -40,7 +42,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/thread_wifi_on_tap_ap_service.json"
             self.tap = "wpan0"
@@ -75,8 +77,8 @@
 
     def test_weave_tunnel(self):
         # TODO: Once LwIP bugs are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
-            print hred("WARNING: Test skipped due to LwIP-based network cofiguration!")            
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+            print(hred("WARNING: Test skipped due to LwIP-based network cofiguration!"))            
             return
 
         # topology has nodes: ThreadNode, BorderRouter, onhub and cloud
@@ -130,37 +132,37 @@
 
 
     def __process_result(self, nodeA, nodeB, value, data):
-        print "ping from " + nodeA + " to " + nodeB + " ",
+        print("ping from " + nodeA + " to " + nodeB + " ", end=' ')
 
         data = data[0]
 
         if value > 11:
-            print hred("Failed")
+            print(hred("Failed"))
         else:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
 
         try:
             self.assertTrue(value < 11, "%s < 11 %%" % (str(value)))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-               print "\t" + line
+               print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace == True:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if value > 11:
             raise ValueError("Weave Ping over Weave Tunnel Failed")
diff --git a/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_03.py b/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_03.py
index e0d8f78..c7c8247 100755
--- a/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_03.py
+++ b/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_03.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #       Copyright (c) 2015-2017  Nest Labs, Inc.
 #       All rights reserved.
@@ -21,6 +21,8 @@
 #       Executes Weave Tunnel tests between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -37,7 +39,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/thread_wifi_on_tap_ap_service.json"
             self.tap = "wpan0"
@@ -68,8 +70,8 @@
 
     def test_weave_tunnel(self):
         # TODO: Once LwIP bugs are fixed, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
-            print hred("WARNING: Test skipped due to LwIP-based network cofiguration!")        
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+            print(hred("WARNING: Test skipped due to LwIP-based network cofiguration!"))        
             return
 
         # topology has nodes: ThreadNode, BorderRouter, onhub and cloud
@@ -82,34 +84,34 @@
     def __process_result(self, value, data):
 
         if value == True:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
 
         try:
             self.assertTrue(value == True, "%s == True %%" % (str(value)))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
             data = data[0]
 
-            print "Border gateway Output: "
+            print("Border gateway Output: ")
             for line in data["gateway_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
-            print "Service Output: "
+            print("Service Output: ")
             for line in data["service_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace:
-                print "Service Strace: "
+                print("Service Strace: ")
                 for line in data["service_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["gateway_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if value != True:
             raise ValueError("Failure in Weave Tunnel Tests")
diff --git a/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_04.py b/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_04.py
index 6c1beb1..046acfa 100755
--- a/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_04.py
+++ b/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_04.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #       Copyright (c) 2015-2017  Nest Labs, Inc.
 #       All rights reserved.
@@ -22,6 +22,8 @@
 #       1. ping test: ThreadNode -> BorderRouter (border gw) -> tunnel + case -> cloud
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -41,7 +43,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/thread_wifi_on_tap_ap_service.json"
             self.tap = "wpan0"
@@ -76,8 +78,8 @@
 
     def test_weave_tunnel(self):
         # TODO: Once LwIP bugs are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
-            print hred("WARNING: Test skipped due to LwIP-based network cofiguration!")
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+            print(hred("WARNING: Test skipped due to LwIP-based network cofiguration!"))
             return
 
         # topology has nodes: ThreadNode, BorderRouter, onhub and cloud
@@ -135,37 +137,37 @@
 
 
     def __process_result(self, nodeA, nodeB, value, data):
-        print "ping from " + nodeA + " to " + nodeB + " ",
+        print("ping from " + nodeA + " to " + nodeB + " ", end=' ')
 
         if value > 11:
-            print hred("Failed")
+            print(hred("Failed"))
         else:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
 
         try:
             self.assertTrue(value < 11, "%s < 11 %%" % (str(value)))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
             data = data[0]
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-               print "\t" + line
+               print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace == True:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if value > 11:
             raise ValueError("Weave Ping over Weave Tunnel Failed")
diff --git a/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_faults.py b/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_faults.py
index 00753c2..2cd3ca5 100755
--- a/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_faults.py
+++ b/src/test-apps/happy/tests/standalone/tunnel/test_weave_tunnel_faults.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -26,6 +26,8 @@
 #          connectivity while faults are injected.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -45,6 +47,8 @@
 import WeaveUtilities
 from WeaveTest import WeaveTest
 import plugins.plaid.Plaid as Plaid
+from six.moves import range
+from functools import reduce
 
 
 gFaultopts = WeaveUtilities.FaultInjectionOptions(nodes=["gateway", "service"])
@@ -54,7 +58,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/thread_wifi_on_tap_ap_service.json"
             self.tap = "wpan0"
@@ -98,8 +102,8 @@
 
     def test_weave_tunnel(self):
         # TODO: Once LwIP bugs are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
-            print hred("WARNING: Test skipped due to LwIP-based network cofiguration!")
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+            print(hred("WARNING: Test skipped due to LwIP-based network cofiguration!"))
             return
 
         # topology has nodes: ThreadNode, BorderRouter, onhub and cloud
@@ -118,7 +122,7 @@
 
         # Run ping test
         for i in range(10):
-            print "  running weave-ping between 'ThreadNode' and 'cloud' (iteration:%s/10)" %(str(i+1))
+            print("  running weave-ping between 'ThreadNode' and 'cloud' (iteration:%s/10)" %(str(i+1)))
             value_ping, data_ping = self.__run_ping_test_between("ThreadNode", "cloud", use_case=False, test_tag = test_tag, use_plaid=self.use_plaid)
             if not value_ping: # 0 == SUCCESS:
                 # we're done, no need for more iterations.
@@ -153,19 +157,19 @@
             for fault_config in fault_configs:
                 auth = "CASE" if use_case else "None"
                 test_tag = "_" + auth + "_" + str(num_tests) + "_" + node + "_" + fault_config
-                print "tag: " + test_tag
+                print("tag: " + test_tag)
 
                 if self.use_plaid:
                     self.__start_plaid_server()
 
                 # Start tunnel
-                print "  starting tunnel between 'BorderRouter' and 'cloud'"
+                print("  starting tunnel between 'BorderRouter' and 'cloud'")
                 value_start, data_start_tunnel = self.__start_tunnel_between("BorderRouter", "cloud", use_case=use_case, num_iterations = 3, faults = {node: fault_config}, test_tag = test_tag, use_plaid=self.use_plaid)
 
                 for i in range(15):
                     # Note that when running on plaid this loop only executes ~3 iterations in what is a minute of virtual time
                     # Without plaid, the number of iterations required is much more
-                    print "  running weave-ping between 'ThreadNode' and 'cloud' (iteration:%s/15)" %(str(i+1))
+                    print("  running weave-ping between 'ThreadNode' and 'cloud' (iteration:%s/15)" %(str(i+1)))
                     value_ping, data_ping = self.__run_ping_test_between("ThreadNode", "cloud", use_case=False, test_tag = test_tag, use_plaid=self.use_plaid)
                     if not value_ping: # 0 == SUCCESS:
                         # we're done, no need for more iterations.
@@ -177,11 +181,11 @@
                     gw_value, gw_output = wt.get_test_output("BorderRouter", "WEAVE-GATEWAY-TUNNEL" + test_tag, quiet=True)
                     if self.__is_tunnel_up(gw_output):
                         break
-                    print "  *** waiting for tunnel to recover *** (%s/15 seconds)" %(str(i+1))
+                    print("  *** waiting for tunnel to recover *** (%s/15 seconds)" %(str(i+1)))
                     time.sleep(1)
 
                 # Stop tunnel
-                print "  stopping tunnel between 'BorderRouter' and 'cloud'"
+                print("  stopping tunnel between 'BorderRouter' and 'cloud'")
                 value_stop, data_stop_tunnel = self.__stop_tunnel_between("BorderRouter", "cloud", test_tag = test_tag)
 
                 if self.use_plaid:
@@ -189,20 +193,20 @@
 
                 results = self.__process_tunnel_results("BorderRouter", value_stop, data_stop_tunnel, value_ping, data_ping, test_tag=test_tag)
 
-                success = reduce(lambda x, y: x and y, results.values())
+                success = reduce(lambda x, y: x and y, list(results.values()))
                 if not success:
-                    print hred("  Failed + [" + test_tag + "]")
+                    print(hred("  Failed + [" + test_tag + "]"))
                     num_failed_tests += 1
                     failed_tests.append(test_tag)
                 else:
-                    print hgreen("  Passed [" + test_tag + "]")
+                    print(hgreen("  Passed [" + test_tag + "]"))
                 num_tests += 1
 
-        print "  executed %d cases" % num_tests
-        print "  failed %d cases:" % num_failed_tests
+        print("  executed %d cases" % num_tests)
+        print("  failed %d cases:" % num_failed_tests)
         if num_failed_tests > 0:
             for failed in failed_tests:
-                print "    " + failed
+                print("    " + failed)
         self.assertEqual(num_failed_tests, 0, "The above tests failed")
 
 
@@ -263,37 +267,37 @@
     def __process_ping_result(self, nodeA, nodeB, value, data):
         num_pings = int(gOptions["num_pings"])
 
-        print "ping from " + nodeA + " to " + nodeB + " ",
+        print("ping from " + nodeA + " to " + nodeB + " ", end=' ')
 
         data = data[0]
 
         if value > num_pings + 1:
-            print hred("Failed")
+            print(hred("Failed"))
         else:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
 
         try:
             self.assertTrue(value < num_pings + 1, "%s < %s %%" % (str(value), num_pings))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-               print "\t" + line
+               print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace == True:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if value > num_pings + 1:
             raise ValueError("Weave Ping over Weave Tunnel Failed")
@@ -310,21 +314,21 @@
 
         # at the end of the test, 'tunnel_up' should be True
         if not tunnel_up:
-            print hred("  Tunnel start: Failed   [" + test_tag + "]")
+            print(hred("  Tunnel start: Failed   [" + test_tag + "]"))
 
         if ping_value != 0:  # loss_percentage == 0
-            print hred("  Ping test: Failed [" + test_tag + "]")
+            print(hred("  Ping test: Failed [" + test_tag + "]"))
 
         if gw_parser_error is True:
-            print hred("  gateway parser error  [" + test_tag + "]")
+            print(hred("  gateway parser error  [" + test_tag + "]"))
 
         if gw_leak_detected is True:
-            print hred("  gateway leak detected [" + test_tag + "]+")
+            print(hred("  gateway leak detected [" + test_tag + "]+"))
 
         if service_parser_error is True:
-            print hred("service parser error")
+            print(hred("service parser error"))
         if service_leak_detected is True:
-            print hred("service resource leak detected")
+            print(hred("service resource leak detected"))
 
         result = {}
         result["tunnel_up"] = tunnel_up
@@ -389,13 +393,13 @@
         self.plaid.startPlaidServerProcess()
 
         emsg = "plaid-server should be running."
-        print "test_weave_tunnel_faults: %s" % (emsg)
+        print("test_weave_tunnel_faults: %s" % (emsg))
 
     def __stop_plaid_server(self):
         self.plaid.stopPlaidServerProcess()
 
         emsg = "plaid-server should not be running any longer."
-        print "test_weave_tunnel_faults: %s" % (emsg)
+        print("test_weave_tunnel_faults: %s" % (emsg))
 
 if __name__ == "__main__":
     help_str = """usage:
@@ -411,15 +415,15 @@
         opts, args = getopt.getopt(sys.argv[1:], "h", longopts)
 
     except getopt.GetoptError as err:
-        print help_str
-        print hred(str(err))
+        print(help_str)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     opts = gFaultopts.process_opts(opts)
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print help_str
+            print(help_str)
             sys.exit(0)
 
         elif o in ("--disable-case"):
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_application_key_01.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_application_key_01.py
index 71e707f..f34d9fc 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_application_key_01.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_application_key_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       B01: Stress Mutual Subscribe: Application key: Key distribution
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -67,8 +69,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[35:].upper()
         wdm_next_args['test_case_name'] = ['B01: Stress Mutual Subscribe: Application key: Key distribution']
-        print 'test file: ' + self.__class__.__name__
-        print "test_weave_wdm_next_application_key test A01 and B01"
+        print('test file: ' + self.__class__.__name__)
+        print("test_weave_wdm_next_application_key test A01 and B01")
         super(test_weave_wdm_next_application_key_01, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_application_key_02.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_application_key_02.py
index 665438a..91e0a30 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_application_key_02.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_application_key_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 #    Copyright (c) 2017 Nest Labs, Inc.
@@ -25,6 +25,8 @@
 #       B02: Stress Mutual Subscribe: Application key: Group key
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import unittest
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,10 +68,10 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[35:].upper()
         wdm_next_args['test_case_name'] = ['B02: Stress Mutual Subscribe: Application key: Group key']
-        print 'test file: ' + self.__class__.__name__
-        print "test_weave_wdm_next_application_key test A02 and B02"
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
-            print "it does not support wdm with group key encryption under Lwip:"
+        print('test file: ' + self.__class__.__name__)
+        print("test_weave_wdm_next_application_key test A02 and B02")
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+            print("it does not support wdm with group key encryption under Lwip:")
             return
         super(test_weave_wdm_next_application_key_02, self).weave_wdm_next_test_base(wdm_next_args)
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_resub.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_resub.py
index b5f734a..4f11c63 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_resub.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_resub.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -26,6 +26,8 @@
 #       after some number of resubscribes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import unittest
@@ -106,7 +108,7 @@
                 wdm_next_args['client_log_check'] = [("Good Iteration", NUM_ITERATIONS),
                                                      ('SendSubscribeRequest', NUM_ITERATIONS * expected_retries)]
                 wdm_next_args['test_tag'] = "%s_%s_FAULT_%s" % (base_test_tag, node.upper(), fault_config)
-                print wdm_next_args['test_tag']
+                print(wdm_next_args['test_tag'])
                 if node == 'client':
                     wdm_next_args['client_faults'] = fault_config
                     wdm_next_args['server_faults'] = None
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_01.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_01.py
index e8417b5..69b4e5e 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_01.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M01: Stress Mutual Subscribe: Root path. Null Version. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M01: Stress Mutual Subscribe: Root path. Null Version. Client in initiator cancels'
         ]
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E01 and M01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E01 and M01")
         super(test_weave_wdm_next_mutual_subscribe_01, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_02.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_02.py
index e0bea55..a7c9b0a 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_02.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M02: Stress Mutual Subscribe: Root path. Null Version. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M02: Stress Mutual Subscribe: Root path. Null Version. Publisher in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E02 and M02"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E02 and M02")
         super(test_weave_wdm_next_mutual_subscribe_02, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_03.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_03.py
index 220d9fe..654d61a 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_03.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_03.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M03: Stress Mutual Subscribe: Root path. Null Version. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M03: Stress Mutual Subscribe: Root path. Null Version. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E03 and M03"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E03 and M03")
         super(test_weave_wdm_next_mutual_subscribe_03, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_04.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_04.py
index 388dfbf..5367cb3 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_04.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_04.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M04: Stress Mutual Subscribe: Root path. Null Version. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M04: Stress Mutual Subscribe: Root path. Null Version. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E04 and M04"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E04 and M04")
         super(test_weave_wdm_next_mutual_subscribe_04, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_05.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_05.py
index c42f891..5fc5ec2 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_05.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_05.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M05: Stress Mutual Subscribe: Root path. Null Version. Idle. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)',wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M05: Stress Mutual Subscribe: Root path. Null Version. Idle, Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F01 and M05"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F01 and M05")
         super(test_weave_wdm_next_mutual_subscribe_05, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_06.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_06.py
index a4d0707..7655a3a 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_06.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_06.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M06: Stress Mutual Subscribe: Root path. Null Version. Idle. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M06: Stress Mutual Subscribe: Root path. Null Version. Idle. Publisher in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F02 and M06"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F02 and M06")
         super(test_weave_wdm_next_mutual_subscribe_06, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_07.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_07.py
index 42bed29..30a7a9f 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_07.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_07.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M07: Stress Mutual Susbscribe: Root path. Null Version. Idle. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M07: Stress Mutual Susbscribe: Root path. Null Version. Idle. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F03 and M07"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F03 and M07")
         super(test_weave_wdm_next_mutual_subscribe_07, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_08.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_08.py
index 3b59460..5b80c36 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_08.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_08.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M08: Stress Mutual Subscribe: Root path. Null Version. Idle. Publisher in initiator aborts.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M08: Stress Mutual Subscribe: Root path. Null Version. Idle. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F04 and M08"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F04 and M08")
         super(test_weave_wdm_next_mutual_subscribe_08, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_09.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_09.py
index 1381d4d..11f57f8 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_09.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_09.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M09: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M09: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F05 and M09"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F05 and M09")
         super(test_weave_wdm_next_mutual_subscribe_09, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_10.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_10.py
index d8111c4..119ff2e 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_10.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_10.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M10: Stress Mutual Subscribe: Root path, Null Version. Mutate data in initiator. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M10: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Publisher in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F06 and M10"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F06 and M10")
         super(test_weave_wdm_next_mutual_subscribe_10, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_11.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_11.py
index 24ffa40..28152e4 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_11.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_11.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M11: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in initiator aborts.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M11: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F07 and M11"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F07 and M11")
         super(test_weave_wdm_next_mutual_subscribe_11, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_12.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_12.py
index 127cf2e..1c2d0e4 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_12.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_12.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M12: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M12: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator.Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F08 and M12"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F08 and M12")
         super(test_weave_wdm_next_mutual_subscribe_12, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_13.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_13.py
index fd4efd9..841963b 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_13.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_13.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M13: Stress Mutual Subscribe: Root path. Null Version. Mutate data in responder. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M13: Stress Mutual Subscribe: Root path. Null Version. Mutate data in responder. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F09 and M13"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F09 and M13")
         super(test_weave_wdm_next_mutual_subscribe_13, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_14.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_14.py
index 13ba270..b5b6036 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_14.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_14.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M14: Stress Mutual Subscribe: Root path. Null Version. Mutate data in responder. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M14: Stress Mutual Subscribe: Root path, Null Version, Notification in responder, Publisher in initiator Cancel']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F10 and M14"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F10 and M14")
         super(test_weave_wdm_next_mutual_subscribe_14, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_15.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_15.py
index d7b3b5a..1f3a924 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_15.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_15.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M15: Stress Mutual Subscribe: Root path. Null Version. Mutate data in responder. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M15: Stress Mutual Subscribe: Root path. Null Version. Notification in responder. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F11 and M15"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F11 and M15")
         super(test_weave_wdm_next_mutual_subscribe_15, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_16.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_16.py
index 98ffc9d..f84a009 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_16.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_16.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M16: Stress Mutual Subscribe: Root path. Null Version. Mutate data in responder. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M16: Stress Mutual Subscribe: Root path. Null Version. Mutate data in responder. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F12 and M16"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F12 and M16")
         super(test_weave_wdm_next_mutual_subscribe_16, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_17.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_17.py
index d8fa8ec..b83939f 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_17.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_17.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M17: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M17: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F13 and M17"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F13 and M17")
         super(test_weave_wdm_next_mutual_subscribe_17, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_18.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_18.py
index e4cc9a8..cf24ec6 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_18.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_18.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M18: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder, Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M18: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Publisher in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F14 and M18"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F14 and M18")
         super(test_weave_wdm_next_mutual_subscribe_18, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_19.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_19.py
index 2e34cd6..d707a22 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_19.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_19.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M19: Stress Mutual Subscribe: Root path, Null Version. Mutate data in initiator and responder. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M19: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F15 and M19"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F15 and M19")
         super(test_weave_wdm_next_mutual_subscribe_19, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_20.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_20.py
index be1a764..608bc88 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_20.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_20.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M20: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M20: Stress Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F16 and M20"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F16 and M20")
         super(test_weave_wdm_next_mutual_subscribe_20, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_21.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_21.py
index 0d8424e..312887a 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_21.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_21.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       E05: Mutual Subscribe: Root path. Null Version. Client in responder cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -62,8 +64,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['E05: Mutual Subscribe: Root path. Null Version. Client in responder cancels']
 
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E05"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E05")
         super(test_weave_wdm_next_mutual_subscribe_21, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_22.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_22.py
index 14aa607..40cb486 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_22.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_22.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       E06: Mutual Subscribe: Root path. Null Version. Publisher in responder cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['E06: Mutual Subscribe: Root path. Null Version. Publisher in responder cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E06"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E06")
         super(test_weave_wdm_next_mutual_subscribe_22, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_23.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_23.py
index 83d96fa..2a7a213 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_23.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_23.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       E07: Mutual Subscribe: Root path. Null Version. Client in responder aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['E07: Mutual Subscribe: Root path. Null Version. Client in responder aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E07"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E07")
         super(test_weave_wdm_next_mutual_subscribe_23, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_24.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_24.py
index f49a791..a87dc76 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_24.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_24.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       E08: Mutual Subscribe: Root path. Null Version. Publisher in responder aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['E08: Mutual Subscribe: Root path. Null Version. Publisher in responder aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test E08"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test E08")
         super(test_weave_wdm_next_mutual_subscribe_24, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_25.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_25.py
index b58be34..1547891 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_25.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_25.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F17: Mutual Subscribe: Root path. Null Version. Idle. Client in responder cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F17: Mutual Subscribe: Root path. Null Version. Idle. Client in responder cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F17"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F17")
         super(test_weave_wdm_next_mutual_subscribe_25, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_26.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_26.py
index d2227fb..57186ad 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_26.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_26.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F18: Mutual Subscribe: Root path. Null Version. Idle. Publisher in responder cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F18: Mutual Subscribe: Root path. Null Version. Idle. Publisher in responder cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F18"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F18")
         super(test_weave_wdm_next_mutual_subscribe_26, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_27.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_27.py
index 60d15df..8ce8ed6 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_27.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_27.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F19: Mutual Subscribe: Root path. Null Version. Idle. Client in responder aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F19: Mutual Subscribe: Root path. Null Version. Idle. Client in responder aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F19"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F19")
         super(test_weave_wdm_next_mutual_subscribe_27, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_28.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_28.py
index 8a8f9ab..c213faf 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_28.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_28.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F20: Mutual Subscribe: Root path. Null Version. Idle. Publisher in responder aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F20: Mutual Subscribe: Root path. Null Version. Idle. Publisher in responder aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F20"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F20")
         super(test_weave_wdm_next_mutual_subscribe_28, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_29.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_29.py
index 83398e2..f55672c 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_29.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_29.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F21: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in responder cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F21: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in responder cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F21"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F21")
         super(test_weave_wdm_next_mutual_subscribe_29, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_30.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_30.py
index 5b59345..e859d22 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_30.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_30.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F22: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Publisher in responder cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F22: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Publisher in responder cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F22"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F22")
         super(test_weave_wdm_next_mutual_subscribe_30, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_31.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_31.py
index 077ce8e..a1d5e01 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_31.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_31.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F23: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in responder aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F23: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Client in responder aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F23"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F23")
         super(test_weave_wdm_next_mutual_subscribe_31, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_32.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_32.py
index f8f3b49..6e2db83 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_32.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_32.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F24: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Publisher in responder aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F24: Mutual Subscribe: Root path. Null Version. Mutate data in initiator. Publisher in responder Abort']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F24"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F24")
         super(test_weave_wdm_next_mutual_subscribe_32, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_33.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_33.py
index 468f161..25fd2a0 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_33.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_33.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F25: Mutual Subscribe: Root path. Null Version. Mutate data in responder. Client in responder cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F25: Mutual Subscribe: Root path. Null Version. Mutate data in responder. Client in responder cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F25"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F25")
         super(test_weave_wdm_next_mutual_subscribe_33, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_34.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_34.py
index 3365206..84218d8 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_34.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_34.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F26: Mutual Subscribe: Root path. Null Version. Mutate data in responder. Publisher in responder cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -62,8 +64,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F26: Mutual Subscribe: Root path. Null Version. Mutate data in responder. Publisher in responder cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F26"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F26")
         super(test_weave_wdm_next_mutual_subscribe_34, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_35.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_35.py
index 7eeb57e..38646dc 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_35.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_35.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F27: Mutual Subscribe: Root path. Null Version. Mutate data in responder. Client in responder aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F27: Mutual Subscribe: Root path. Null Version. Mutate data in responder. Client in responder aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F27"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F27")
         super(test_weave_wdm_next_mutual_subscribe_35, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_36.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_36.py
index 2982a4a..13b61ec 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_36.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_36.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F28: Mutual Subscribe: Root path. Null Version. Mutate data in responder. Publisher in responder aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F28: Mutual Subscribe: Root path. Null Version. Mutate data in responder. Publisher in responder aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F28"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F28")
         super(test_weave_wdm_next_mutual_subscribe_36, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_37.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_37.py
index afb0b87..af39f2e 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_37.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_37.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F29: Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder, Client in responder cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F29: Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Client in responder cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F29"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F29")
         super(test_weave_wdm_next_mutual_subscribe_37, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_38.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_38.py
index 24f32b6..c5c7cbe 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_38.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_38.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F30: Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Publisher in responder cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F30: Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Publisher in responder cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F30"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F30")
         super(test_weave_wdm_next_mutual_subscribe_38, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_39.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_39.py
index b880839..dc9e41e 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_39.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_39.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F31: Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Client in responder aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F31: Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Client in responder aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F31"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F31")
         super(test_weave_wdm_next_mutual_subscribe_39, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_40.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_40.py
index 0ff52f0..1d27038 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_40.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_40.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       F32: Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Publisher in responder aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['F32: Mutual Subscribe: Root path. Null Version. Mutate data in initiator and responder. Publisher in responder aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test F32"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test F32")
         super(test_weave_wdm_next_mutual_subscribe_40, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_41.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_41.py
index 2d414a6..a9da847 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_41.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_41.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       G01: Mutual Subscribe: Multiple Iterations. Mutate data in responder. Client in Initiator aborts. Version is kept.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -62,8 +64,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['G01: Mutual Subscribe: Multiple Iterations. Mutate data in responder. Client in initiator aborts. Version is kept.']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test G01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test G01")
         super(test_weave_wdm_next_mutual_subscribe_41, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_42.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_42.py
index c391f37..5e84f4a 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_42.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_42.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       G02: Mutual Subscribe: Multiple Iterations. Mutate data in initiator. Client in initiator aborts. Version is kept.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -62,8 +64,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['G02: Mutual Subscribe: Multiple Iterations. Mutate data in initiator. Client in initiator aborts. Version is kept.']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test G02"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test G02")
         super(test_weave_wdm_next_mutual_subscribe_42, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_43.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_43.py
index ad6b0bb..801f44d 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_43.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_43.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       G03: Mutual Subscribe: Multiple Iterations. Mutate data in initiator and responder. Client in Initiator aborts. Version is kept.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['G03: Mutual Subscribe: Multiple Iterations. Mutate data in initiator and responder. Client in initiator aborts. Version is kept']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test G03"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test G03")
         super(test_weave_wdm_next_mutual_subscribe_43, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_44.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_44.py
index 4dc890a..35e6c8f 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_44.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_44.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M25: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M25: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I01 and M25"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I01 and M25")
         super(test_weave_wdm_next_mutual_subscribe_44, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_45.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_45.py
index a92447e..9a2c362 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_45.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_45.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M26: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M26: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Publisher in Initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I02 and M26"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I02 and M26")
         super(test_weave_wdm_next_mutual_subscribe_45, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_46.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_46.py
index 107a48a..cf23138 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_46.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_46.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M27: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M27: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I03 and M27"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I03 and M27")
         super(test_weave_wdm_next_mutual_subscribe_46, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_47.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_47.py
index 4546ef1..58a7e0d 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_47.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_47.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M28: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M28: Stress Mutual Subscribe: Initiator Continuous Events. Mutate data in initiator. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I04 and M28"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I04 and M28")
         super(test_weave_wdm_next_mutual_subscribe_47, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_48.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_48.py
index c90dccb..3f76095 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_48.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_48.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M29: Stress Mutual Subscribe: Responder Continuous Events. Mutate data in responder. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -64,8 +66,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M29: Stress Mutual Subscribe: Responder Continuous Events. Mutate data in responder. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I05 and M29"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I05 and M29")
         super(test_weave_wdm_next_mutual_subscribe_48, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_49.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_49.py
index d6b78fc..95d2a53 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_49.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_49.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M30: Stress Mutual Subscribe: Responder Continuous Events. Mutate data in responder. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -64,8 +66,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M30: Stress Mutual Subscribe: Responder Continuous Events. Mutate data in responder. Publisher in Initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I06 and M30"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I06 and M30")
         super(test_weave_wdm_next_mutual_subscribe_49, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_50.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_50.py
index 63ece93..d1dbd5a 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_50.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_50.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M31: Stress Mutual Subscribe: Responder Continuous Events. Mutate data in responder. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -64,8 +66,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M31: Stress Mutual Subscribe: Responder Continuous Events. Mutate data in responder. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I07 and M31"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I07 and M31")
         super(test_weave_wdm_next_mutual_subscribe_50, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_51.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_51.py
index 91c4835..dcebcbc 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_51.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_51.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M32: Stress Mutual Subscribe: Responder Continuous Events. Mutate data in responder. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M32: Stress Mutual Subscribe: Responder Continuous Events. Mutate data in responder. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I08 and M32"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I08 and M32")
         super(test_weave_wdm_next_mutual_subscribe_51, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_52.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_52.py
index d42ba1c..5e0620c 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_52.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_52.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M33: Stress Mutual Subscribe: Initiator Continuous Events. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M33: Stress Mutual Subscribe: Initiator Continuous Events. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I09 and M33"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I09 and M33")
         super(test_weave_wdm_next_mutual_subscribe_52, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_53.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_53.py
index 5f51150..2f90f80 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_53.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_53.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M34: Stress Mutual Subscribe: Initiator Continuous Events. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M34: Stress Mutual Subscribe: Initiator Continuous Events. Publisher in Initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I10 and M34"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I10 and M34")
         super(test_weave_wdm_next_mutual_subscribe_53, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_54.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_54.py
index d6be5f1..d7693f4 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_54.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_54.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M35: Stress Mutual Subscribe: Initiator Continuous Events. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M35: Stress Mutual Subscribe: Initiator Continuous Events. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I11 and M35"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I11 and M35")
         super(test_weave_wdm_next_mutual_subscribe_54, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_55.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_55.py
index 70febbd..7690248 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_55.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_55.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M36: Stress Mutual Subscribe: Initiator Continuous Events. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M36: Stress Mutual Subscribe: Initiator Continuous Events. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I12 and M36"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I12 and M36")
         super(test_weave_wdm_next_mutual_subscribe_55, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_56.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_56.py
index df27754..9ddb7e3 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_56.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_56.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M37: Stress Mutual Subscribe: Responder Continuous Events. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -64,8 +66,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M37: Stress Mutual Subscribe: Responder Continuous Events. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I13 and M37"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I13 and M37")
         super(test_weave_wdm_next_mutual_subscribe_56, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_57.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_57.py
index ac605c3..b362d15 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_57.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_57.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M38: Stress Mutual Subscribe: Responder Continuous Events. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -64,8 +66,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M38: Stress Mutual Subscribe: Responder Continuous Events. Mutate data in responder. Publisher in Initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I14 and M38"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I14 and M38")
         super(test_weave_wdm_next_mutual_subscribe_57, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_58.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_58.py
index 16cef47..1434a8b 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_58.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_58.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M39: Stress Mutual Subscribe: Responder Continuous Events. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -64,8 +66,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M39: Stress Mutual Subscribe: Responder Continuous Events. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I15 and M39"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I15 and M39")
         super(test_weave_wdm_next_mutual_subscribe_58, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_59.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_59.py
index 7d344b6..1814b6f 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_59.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_59.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M40: Stress Mutual Subscribe: Responder Continuous Events. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M40: Stress Mutual Subscribe: Responder Continuous Events. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I16 and M40"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I16 and M40")
         super(test_weave_wdm_next_mutual_subscribe_59, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_60.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_60.py
index fa54163..0fb746b 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_60.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_60.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M41: Stress Mutual Subscribe: Initiator and Responder Continuous Events. Mutate data in initiator responder. Client in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -68,8 +70,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M41: Initiator and Responder Continuous Events. Mutate data in initiator responder. Client in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I17 and M41"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I17 and M41")
         super(test_weave_wdm_next_mutual_subscribe_60, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_61.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_61.py
index aac4822..f13cbe5 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_61.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_61.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M42: Stress Mutual Subscribe: Initiator and Responder Continuous Events. Mutate data in initiator and responder. Publisher in initiator cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -68,8 +70,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M42: Stress Mutual Subscribe: Initiator and Responder Continuous Events. Mutate data in initiator and responder. Publisher in initiator cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I18 and M42"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I18 and M42")
         super(test_weave_wdm_next_mutual_subscribe_61, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_62.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_62.py
index d25fe8d..3a1693e 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_62.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_62.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M43: Stress Mutual Subscribe: Initiator and Responder Continuous Events. Mutate data in initiator and responder. Client in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -68,8 +70,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M43: Stress Mutual Subscribe: Initiator and Responder Continuous Events. Mutate data in initiator and responder. Client in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I19 and M43"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I19 and M43")
         super(test_weave_wdm_next_mutual_subscribe_62, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_63.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_63.py
index a3ac4c1..23e23ce 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_63.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_63.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       M44: Stress Mutual Subscribe: Initiator and Responder Continuous Events. Mutate data in initiator and responder. Publisher in initiator aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -68,8 +70,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['M44: Stress Mutual Subscribe: Initiator and Responder Continuous Events. Mutate data in initiator and responder. Publisher in initiator aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test I20 and M44"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test I20 and M44")
         super(test_weave_wdm_next_mutual_subscribe_63, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_64.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_64.py
index 3103ba9..bb662fe 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_64.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_64.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       N01: Stress Mutual Subscribe: Oversize trait exists in the end of source trait list at initiator and in the beginning of source trait list at responder.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -71,8 +73,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['N01: Stress Mutual Subscribe: Oversize trait exists in the end of source trait list at initiator and in the beginning of source trait list at responder.']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test N01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test N01")
         super(test_weave_wdm_next_mutual_subscribe_64, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_65.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_65.py
index 3b11b12..8fcfcae 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_65.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_65.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       N01: Stress Mutual Subscribe: Oversize trait exists in the end of source trait list at initiator and in the middle of source trait list at responder.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -71,8 +73,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['N02: Stress Mutual Subscribe: Oversize trait exists in the end of source trait list at initiator and in the middle of source trait list at responder.']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test N02"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test N02")
         super(test_weave_wdm_next_mutual_subscribe_65, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_faults.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_faults.py
index e3e4af1..747d659 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_faults.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_faults.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -26,6 +26,8 @@
 #       The initiator generates events as well.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import unittest
@@ -144,8 +146,8 @@
         self.wdm_next_args['client_faults'] = None
         self.wdm_next_args['server_faults'] = None
 
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test mutual with faults"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test mutual with faults")
 
         super(test_weave_wdm_next_mutual_subscribe_faults, self).weave_wdm_next_test_base(wdm_next_args)
 
@@ -170,7 +172,7 @@
 
             for fault_config in fault_configs:
                 wdm_next_args['test_tag'] = base_test_tag + "_" + str(num_tests) + "_" + node + "_" + fault_config
-                print wdm_next_args['test_tag']
+                print(wdm_next_args['test_tag'])
                 if node == 'client':
                     wdm_next_args['client_faults'] = fault_config
                     wdm_next_args['server_faults'] = None
@@ -198,15 +200,15 @@
         opts, args = getopt.getopt(sys.argv[1:], "h", longopts)
 
     except getopt.GetoptError as err:
-        print help_str
-        print hred(str(err))
+        print(help_str)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     opts = gFaultopts.process_opts(opts)
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print help_str
+            print(help_str)
             sys.exit(0)
 
     sys.argv = [sys.argv[0]]
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_01.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_01.py
index e023d97..f6f77e5 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_01.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       L01: Stress One way Subscribe: Root path. Null Version. Client cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 import os
@@ -63,8 +65,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['L01: Stress One way Subscribe: Root path. Null Version. Client cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test B01 and L01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test B01 and L01")
         super(test_weave_wdm_next_one_way_subscribe_01, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_02.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_02.py
index 5550ab3..c6d5521 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_02.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       L02: Stress One way Subscribe: Root path. Null Version. Client aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['L02: Stress One way Subscribe: Root path. Null Version. Client aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test B02 and L02"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test B02 and L02")
         super(test_weave_wdm_next_one_way_subscribe_02, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_03.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_03.py
index 392d5f0..3d7fd00 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_03.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_03.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       L03: Stress One way Subscribe: Root path. Null Version. Idle. Client cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['L03: Stress One way Subscribe: Root path. Null Version. Idle. Client cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test C01 and L03"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test C01 and L03")
         super(test_weave_wdm_next_one_way_subscribe_03, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_04.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_04.py
index 45eb739..b5ba61b 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_04.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_04.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       L04: Stress One way Subscribe: Root path. Null Version. Idle. Client aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -62,8 +64,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['L04: Stress One way Subscribe: Root path. Null Version. Idle. Client aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test C02 and L04"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test C02 and L04")
         super(test_weave_wdm_next_one_way_subscribe_04, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_05.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_05.py
index 361c8cb..57bb859 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_05.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_05.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       L05: Stress One way Subscribe: Root path. Null Version. Mutate data in Publisher. Client cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -60,8 +62,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'] * 1)]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['L05: Stress One way Subscribe: Root path, Null Version. Mutate data in Publisher. Client cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test C03 and L05"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test C03 and L05")
         super(test_weave_wdm_next_one_way_subscribe_05, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_06.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_06.py
index 205969c..335f975 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_06.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_06.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       L06: One way Subscribe: Root path. Null Version. Mutate data in Publisher. Client aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['L06: Stress One way Subscribe: Root path. Null Version. Mutate data in Publisher. Client aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test C04 and L06"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test C04 and L06")
         super(test_weave_wdm_next_one_way_subscribe_06, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_07.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_07.py
index 1d2cad4..d9bd877 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_07.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_07.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       B03: One way Subscribe: Root path. Null Version. Publisher cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -58,8 +60,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['B03: One way Subscribe: Root path. Null Version. Publisher cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test B04"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test B04")
         super(test_weave_wdm_next_one_way_subscribe_07, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_08.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_08.py
index 11d6e41..05e5474 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_08.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_08.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       B04: One way Subscribe: Root path. Null Version. Publisher aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -56,8 +58,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['B04: One way Subscribe: Root path. Null Version. Publisher aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test B04"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test B04")
         super(test_weave_wdm_next_one_way_subscribe_08, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_09.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_09.py
index a6cb897..384fd7c 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_09.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_09.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       C05: One way Subscribe: Root path. Null Version. Idle. Publisher cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -58,8 +60,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['C05: One way Subscribe: Root path. Null Version. Idle. Publisher cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test C05"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test C05")
         super(test_weave_wdm_next_one_way_subscribe_09, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_10.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_10.py
index d7c74b1..95ce20e 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_10.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_10.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       C06: One way Subscribe: Root path. Null Version. Idle. Publisher aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -55,8 +57,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['C06: One way Subscribe: Root path, Null Version, Idle, Publisher Abort']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test C06"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test C06")
         super(test_weave_wdm_next_one_way_subscribe_10, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_11.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_11.py
index 7720e9d..f15365b 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_11.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_11.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       C07: One way Subscribe: Root path. Null Version. Mutate data in publisher. Publisher cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -59,8 +61,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['C07: One way Subscribe: Root path. Null Version. Mutate data in publisher. Publisher cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test C07"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test C07")
         super(test_weave_wdm_next_one_way_subscribe_11, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_12.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_12.py
index a5d4f2f..75c1fb8 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_12.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_12.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       C08: One way Subscribe: Root path. Null Version. Mutate data in publisher. Publisher aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -55,7 +57,7 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['C08: One way Subscribe: Root path. Null Version. Mutate data in publisher. Publisher aborts']
-        print 'test file: ' + self.__class__.__name__
+        print('test file: ' + self.__class__.__name__)
         super(test_weave_wdm_next_one_way_subscribe_12, self).weave_wdm_next_test_base(wdm_next_args)
 
 if __name__ == "__main__":
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_13.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_13.py
index 9c605f8..fb7a612 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_13.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_13.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       D01: One way Subscribe: Multiple Iterations. Mutate data in publisher. Client aborts. Version is kept
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -60,8 +62,8 @@
 
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['D01: One way Subscribe: Multiple Iterations. Mutate data in publisher. Client aborts. Version is kept']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test D01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test D01")
         super(test_weave_wdm_next_one_way_subscribe_13, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_14.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_14.py
index 7a9fb50..b917c07 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_14.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_14.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       L07: Stress One way Subscribe: Publisher Continuous Events. Publisher mutates trait data. Client cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['L07: Stress One way Subscribe: Publisher Continuous Events. Publisher mutates trait data. Client cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test H01 and L07"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test H01 and L07")
         super(test_weave_wdm_next_one_way_subscribe_14, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_15.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_15.py
index 93427d7..5d7d91d 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_15.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_15.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       L08: Stress One way Subscribe: Publisher Continuous Events. Publisher mutates trait data. Client aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -60,8 +62,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['L08: Stress One way Subscribe: Publisher Continuous Events. Publisher mutates trait data. Client aborts']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test H02 and L08"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test H02 and L08")
         super(test_weave_wdm_next_one_way_subscribe_15, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_16.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_16.py
index 01f627b..f6943ea 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_16.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_16.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       L09: Stress One way Subscribe: Client Continuous Events. Client cancels
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['L09: Stress One way Subscribe: Publisher Continuous Events. Client cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test B03 and L09"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test B03 and L09")
         super(test_weave_wdm_next_one_way_subscribe_16, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_17.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_17.py
index 4bd1989..b6e8788 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_17.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_17.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       L10: Stress One way Subscribe: Publisher Continuous Events. Client aborts
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -61,8 +63,8 @@
                                              ('Handler\[0\] Moving to \[ FREE\] Ref\(0\)', wdm_next_args['test_client_iterations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['L10: Stress One way Subscribe: Publisher Continuous Events. Client cancels']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test H04 and L10"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test H04 and L10")
         super(test_weave_wdm_next_one_way_subscribe_17, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_oneway_resub.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_oneway_resub.py
index 3d80f50..c0a6ec5 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_oneway_resub.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_oneway_resub.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -26,6 +26,8 @@
 #       after some number of resubscribes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import unittest
@@ -93,7 +95,7 @@
                 wdm_next_args['client_log_check'] = [("Good Iteration", NUM_ITERATIONS),
                                                      ('SendSubscribeRequest', NUM_ITERATIONS * expected_retries)]
                 wdm_next_args['test_tag'] = base_test_tag + "_" + fault_config
-                print wdm_next_args['test_tag']
+                print(wdm_next_args['test_tag'])
                 if node == 'client':
                     wdm_next_args['client_faults'] = fault_config
                     wdm_next_args['server_faults'] = None
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_oneway_subscribe_faults.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_oneway_subscribe_faults.py
index faf461d..c3e00b2 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_oneway_subscribe_faults.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_oneway_subscribe_faults.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       The server in the mean time modifies its trait instance once.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import sys
 import unittest
@@ -77,8 +79,8 @@
         wdm_next_args['client_faults'] = None
         wdm_next_args['server_faults'] = None
 
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test one way with faults"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test one way with faults")
 
         super(test_weave_wdm_next_oneway_subscribe_faults, self).weave_wdm_next_test_base(wdm_next_args)
 
@@ -102,7 +104,7 @@
         
             for fault_config in fault_configs:
                 wdm_next_args['test_tag'] = base_test_tag + "_" + str(num_tests) + "_" + node + "_" + fault_config
-                print wdm_next_args['test_tag']
+                print(wdm_next_args['test_tag'])
                 if node == 'client':
                     wdm_next_args['client_faults'] = fault_config
                     wdm_next_args['server_faults'] = None
@@ -128,15 +130,15 @@
         opts, args = getopt.getopt(sys.argv[1:], "h", longopts)
 
     except getopt.GetoptError as err:
-        print help_str
-        print hred(str(err))
+        print(help_str)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     opts = gFaultopts.process_opts(opts)
 
     for o, a in opts:
         if o in ("-h", "--help"):
-            print help_str
+            print(help_str)
             sys.exit(0)
 
     sys.argv = [sys.argv[0]]
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_subless_notify_01.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_subless_notify_01.py
index da31141..5590d4c 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_subless_notify_01.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_subless_notify_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Sends Weave WDM subscriptionless notification between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 import os
@@ -65,8 +67,8 @@
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['O01: Subscriptionless Notify: Publisher sends subscriptionless notify to receiver, and receiver notifies application after processing trait data'
         ]
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next test O01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next test O01")
         super(test_weave_wdm_next_subless_notify_01, self).weave_wdm_next_test_base(wdm_next_args)
 
         if not gOptions['enableFaults']:
@@ -97,7 +99,7 @@
 
             for fault_config in fault_configs:
                 wdm_next_args['test_tag'] = base_test_tag + "_" + str(num_tests) + "_" + node + "_" + fault_config
-                print wdm_next_args['test_tag']
+                print(wdm_next_args['test_tag'])
                 if node == 'client':
                     wdm_next_args['client_faults'] = fault_config
                     wdm_next_args['server_faults'] = None
@@ -122,15 +124,15 @@
         opts, args = getopt.getopt(sys.argv[1:], "hf:", longopts)
 
     except getopt.GetoptError as err:
-        print help_str
-        print hred(str(err))
+        print(help_str)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     opts = gFaultOpts.process_opts(opts)
 
     for o in opts:
         if o in ("-h", "--help"):
-            print help_str
+            print(help_str)
             sys.exit(0)
 
         elif o in ("-f", "--enable-faults"):
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_01.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_01.py
index b4839a3..26da2df 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_01.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -26,6 +26,8 @@
 #       and receives notification and status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -67,8 +69,8 @@
         wdm_next_args['server_log_check'] = [('Send Update Response with profileId 0x0 statusCode 0x0', wdm_next_args['test_client_iterations'] * wdm_next_args['client_update_num_mutations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['Update 01: Client creates mutual subscription, sends conditional update request to publisher, and receives notification and status report']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next update test 01"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next update test 01")
         super(test_weave_wdm_next_update_01, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_02.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_02.py
index 815d529..fb7a506 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_02.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_02.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -26,6 +26,8 @@
 #       and receives notification and status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -67,8 +69,8 @@
         wdm_next_args['server_log_check'] = [('Send Update Response with profileId 0x0 statusCode 0x0', wdm_next_args['test_client_iterations'] * wdm_next_args['client_update_num_mutations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['Update 02: Client creates mutual subscription, sends unconditional update request to publisher, and receives notification and status report']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next update test 02"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next update test 02")
         super(test_weave_wdm_next_update_02, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_03.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_03.py
index f198f17..105839e 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_03.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_03.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       Update 03: Client sends standalone unconditional update request to publisher, and receives status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
         wdm_next_args['server_log_check'] = [('Send Update Response with profileId 0x0 statusCode 0x0', wdm_next_args['test_client_iterations'] * wdm_next_args['client_update_num_mutations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['Update 03: Client sends standalone unconditional update request to publisher, and receives status report']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next update test 03"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next update test 03")
         super(test_weave_wdm_next_update_03, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_04.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_04.py
index 71629b8..85de609 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_04.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_04.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -24,6 +24,8 @@
 #       Update 04: Client sends standalone unconditional update request to publisher during subscription, and receives
 #       status report and notification.
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -65,8 +67,8 @@
         wdm_next_args['server_log_check'] = [('Send Update Response with profileId 0x0 statusCode 0x0', wdm_next_args['test_client_iterations'] * wdm_next_args['client_update_num_mutations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['Update 04: Client sends standalone unconditional update request to publisher during subscription, and receives status report and notification']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next update test 04"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next update test 04")
         super(test_weave_wdm_next_update_04, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_05.py b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_05.py
index 4068cbb..6a7f409 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_05.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_update_05.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -25,6 +25,8 @@
 #       Update 05: Client sends standalone unconditional update request to publisher, and receives status report
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import unittest
 import set_test_path
 from weave_wdm_next_test_base import weave_wdm_next_test_base
@@ -66,8 +68,8 @@
         wdm_next_args['server_log_check'] = [('Send Update Response with profileId 0x0 statusCode 0x0', wdm_next_args['test_client_iterations'] * wdm_next_args['client_update_num_mutations'])]
         wdm_next_args['test_tag'] = self.__class__.__name__[19:].upper()
         wdm_next_args['test_case_name'] = ['Update 05: Client sends standalone unconditional update request to publisher, and receives status report']
-        print 'test file: ' + self.__class__.__name__
-        print "weave-wdm-next update test 05"
+        print('test file: ' + self.__class__.__name__)
+        print("weave-wdm-next update test 05")
         super(test_weave_wdm_next_update_05, self).weave_wdm_next_test_base(wdm_next_args)
 
 
diff --git a/src/test-apps/happy/tests/standalone/wdmNext/weave_wdm_next_test_base.py b/src/test-apps/happy/tests/standalone/wdmNext/weave_wdm_next_test_base.py
index e405ea2..c7ad27f 100755
--- a/src/test-apps/happy/tests/standalone/wdmNext/weave_wdm_next_test_base.py
+++ b/src/test-apps/happy/tests/standalone/wdmNext/weave_wdm_next_test_base.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Calls Weave WDM base test class between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import re
@@ -48,17 +50,17 @@
         self.wdm_option = None
         self.options = None
 
-        if "WDM_CLIENT_LIVENESS_CHECK_PERIOD" in os.environ.keys():
+        if "WDM_CLIENT_LIVENESS_CHECK_PERIOD" in list(os.environ.keys()):
             self.wdm_client_liveness_check_period = int(os.environ["WDM_CLIENT_LIVENESS_CHECK_PERIOD"])
         else:
             self.wdm_client_liveness_check_period = None
 
-        if "WDM_SERVER_LIVENESS_CHECK_PERIOD" in os.environ.keys():
+        if "WDM_SERVER_LIVENESS_CHECK_PERIOD" in list(os.environ.keys()):
             self.wdm_server_liveness_check_period = int(os.environ["WDM_SERVER_LIVENESS_CHECK_PERIOD"])
         else:
             self.wdm_server_liveness_check_period = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -126,7 +128,7 @@
 
             for pair in pairs_of_nodes:
                 if pair[0] == pair[1]:
-                    print "Skip weave-wdm test on client and server running on the same node."
+                    print("Skip weave-wdm test on client and server running on the same node.")
                     continue
                 value, data = self.__run_wdm_test_between(pair[0], pair[1])
                 self.__process_result(pair[0], pair[1], value, data)
@@ -182,7 +184,7 @@
         return (wdm_stress_check, stress_failures)
 
     def __process_result(self, nodeA, nodeB, value, data):
-        print "weave-wdm-next %s from " % self.wdm_option + nodeA + " to " + nodeB + " "
+        print("weave-wdm-next %s from " % self.wdm_option + nodeA + " to " + nodeB + " ")
         data = data[0]
         test_results = []
         wdm_stress_check = value
@@ -251,7 +253,7 @@
         self.__output_test_result(output_file_name, output_data)
 
         self.assertTrue(wdm_stress_check, "\nwdm_stress_check is False\n\n" + "\n\t".join(stress_failures))
-        print hgreen("Passed")
+        print(hgreen("Passed"))
 
     def __output_test_result(self, file_path, output_data):
         options = plugins.testrail.TestrailResultOutput.option()
diff --git a/src/test-apps/happy/tests/standalone/wdmv0/test_weave_wdmv0_01.py b/src/test-apps/happy/tests/standalone/wdmv0/test_weave_wdmv0_01.py
index 841314b..f4f0041 100755
--- a/src/test-apps/happy/tests/standalone/wdmv0/test_weave_wdmv0_01.py
+++ b/src/test-apps/happy/tests/standalone/wdmv0/test_weave_wdmv0_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #       Copyright (c) 2015-2017  Nest Labs, Inc.
 #       All rights reserved.
@@ -21,6 +21,8 @@
 #       Calls Weave WDMv0 Test between nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import unittest
@@ -43,7 +45,7 @@
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -87,9 +89,9 @@
     def __process_result(self, nodeA, nodeB, value, data):
 
         if value:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
             raise ValueError("Weave WDMv0 Test Failed")
 
 
diff --git a/src/test-apps/happy/tests/standalone/wrmp/test_weave_wrmp_01.py b/src/test-apps/happy/tests/standalone/wrmp/test_weave_wrmp_01.py
index 007b086..7d7e1c0 100755
--- a/src/test-apps/happy/tests/standalone/wrmp/test_weave_wrmp_01.py
+++ b/src/test-apps/happy/tests/standalone/wrmp/test_weave_wrmp_01.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -23,6 +23,8 @@
 #       Run Weave WRMP test #1 between two Thread nodes.
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import itertools
 import os
 import sys
@@ -36,13 +38,14 @@
 import WeaveStateUnload
 import WeaveWRMP
 import WeaveUtilities
+from six.moves import range
 
 
 class test_weave_wrmp(unittest.TestCase):
     def setUp(self):
         self.tap = None
 
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
             self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \
                 "/../../../topologies/standalone/three_nodes_on_tap_thread_weave.json"
             self.tap = "wpan0"
@@ -77,8 +80,8 @@
 
     def test_weave_wrmp_among_all_nodes(self):
         # TODO: Once LwIP bugs are fix, enable this test on LwIP
-        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
-            print hred("WARNING: Test skipped due to LwIP-based network cofiguration!")            
+        if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in list(os.environ.keys()) and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
+            print(hred("WARNING: Test skipped due to LwIP-based network cofiguration!"))            
             return
 
         options = happy.HappyNodeList.option()
@@ -92,7 +95,7 @@
 
         for pair in pairs_of_nodes:
             if pair[0] == pair[1]:
-                print "Skip WRMP test on client and server running on the same node."
+                print("Skip WRMP test on client and server running on the same node.")
                 continue
 
             for t in range(1,17):
@@ -101,35 +104,35 @@
 
 
     def __process_result(self, nodeA, nodeB, value, data, test_num):
-        print "wrmp from " + nodeA + " to " + nodeB + " (Test #" + str(test_num) + ") ",
+        print("wrmp from " + nodeA + " to " + nodeB + " (Test #" + str(test_num) + ") ", end=' ')
 
         if value == True:
-            print hgreen("Passed")
+            print(hgreen("Passed"))
         else:
-            print hred("Failed")
+            print(hred("Failed"))
 
         try:
             self.assertTrue(value == True, "%s == True %%" % (str(value)))
-        except AssertionError, e:
-            print str(e)
-            print "Captured experiment result:"
+        except AssertionError as e:
+            print(str(e))
+            print("Captured experiment result:")
 
-            print "Client Output: "
+            print("Client Output: ")
             for line in data["client_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
-            print "Server Output: "
+            print("Server Output: ")
             for line in data["server_output"].split("\n"):
-                print "\t" + line
+                print("\t" + line)
 
             if self.show_strace:
-                print "Server Strace: "
+                print("Server Strace: ")
                 for line in data["server_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
-                print "Client Strace: "
+                print("Client Strace: ")
                 for line in data["client_strace"].split("\n"):
-                    print "\t" + line
+                    print("\t" + line)
 
         if value != True:
             raise ValueError("WRMP #" + str(test_num) + " Failed")
diff --git a/src/test-apps/happy/topologies/dynamic/thread_wifi_ap_internet_configurable_topology.py b/src/test-apps/happy/topologies/dynamic/thread_wifi_ap_internet_configurable_topology.py
index 4e50a7c..af78d42 100755
--- a/src/test-apps/happy/topologies/dynamic/thread_wifi_ap_internet_configurable_topology.py
+++ b/src/test-apps/happy/topologies/dynamic/thread_wifi_ap_internet_configurable_topology.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 #
@@ -27,6 +27,8 @@
 # - the onhub router is connected to the Internet
 #
 
+from __future__ import absolute_import
+from __future__ import print_function
 import getopt
 import os
 import set_test_path
@@ -35,6 +37,7 @@
 import lib.WeaveTopologyMgr
 import sys
 import uuid
+from six.moves import range
 
 
 default_quiet = False
@@ -163,7 +166,7 @@
         self.topology.HappyStateDelete(quiet=self.quiet)
 
     def getISPPrefix(self):
-        if "weave_service_address" in os.environ.keys():
+        if "weave_service_address" in list(os.environ.keys()):
             prefix = os.environ['weave_service_address'].split(".")[-3][0:3]
         else:
             prefix = "test"
@@ -177,8 +180,8 @@
             ["help", "action=", "quiet", "fabric_id=", "customized_eui64_seed=", "tap=", "cellular", "mobile", "device_numbers=", "initial_device_index=", "enable_random_fabric"])
 
     except getopt.GetoptError as err:
-        print thread_wifi_ap_internet_configurable_topology.__doc__
-        print hred(str(err))
+        print(thread_wifi_ap_internet_configurable_topology.__doc__)
+        print(hred(str(err)))
         sys.exit(hred("%s: Failed to parse arguments." % (__file__)))
 
     for o, a in opts:
@@ -219,11 +222,11 @@
             assert False, "unhandled option"
 
     if "action" not in options:
-        print thread_wifi_ap_internet_configurable_topology.__doc__
+        print(thread_wifi_ap_internet_configurable_topology.__doc__)
         sys.exit(0)
 
     if options["action"] not in ["create", "destroy"]:
-        print thread_wifi_ap_internet_configurable_topology.__doc__
+        print(thread_wifi_ap_internet_configurable_topology.__doc__)
         sys.exit(0)
 
     if ("fabric_id" in options) and ("customized_eui64_seed" in options):
@@ -231,7 +234,7 @@
         customized_eui64_seed = options["customized_eui64_seed"]
 
     else:
-        print thread_wifi_ap_internet_configurable_topology.__doc__
+        print(thread_wifi_ap_internet_configurable_topology.__doc__)
         sys.exit(0)
 
     if "device_numbers" in options:
diff --git a/src/test-apps/happy/topologies/standalone/thread_wifi_on_tap_ap_service.sh b/src/test-apps/happy/topologies/standalone/thread_wifi_on_tap_ap_service.sh
index cb69c35..42616dc 100755
--- a/src/test-apps/happy/topologies/standalone/thread_wifi_on_tap_ap_service.sh
+++ b/src/test-apps/happy/topologies/standalone/thread_wifi_on_tap_ap_service.sh
@@ -25,6 +25,7 @@
 
 # There is no need to set IP and Route for tap devices here, since it will be 
 # assigned from lwip stack
+
 export PATH=$PATH:$(dirname $(readlink -f "$0"))/../../bin
 happy-network-add HomeThread thread
 happy-network-address HomeThread 2001:db8:111:1::
diff --git a/src/test-apps/happy/topologies/standalone/three_nodes_on_tap_thread_weave.sh b/src/test-apps/happy/topologies/standalone/three_nodes_on_tap_thread_weave.sh
index c075beb..7bbe012 100755
--- a/src/test-apps/happy/topologies/standalone/three_nodes_on_tap_thread_weave.sh
+++ b/src/test-apps/happy/topologies/standalone/three_nodes_on_tap_thread_weave.sh
@@ -19,6 +19,7 @@
 
 # Steps to manually build three_nodes_on_tap_thread_happy.json
 
+export PATH=$PATH:$(dirname $(readlink -f "$0"))/../../bin
 happy-node-add node01
 happy-node-add node02
 happy-node-add node03
diff --git a/src/test-apps/happy/topologies/standalone/three_nodes_on_tap_wifi_weave.sh b/src/test-apps/happy/topologies/standalone/three_nodes_on_tap_wifi_weave.sh
index 1e71503..2161bc7 100755
--- a/src/test-apps/happy/topologies/standalone/three_nodes_on_tap_wifi_weave.sh
+++ b/src/test-apps/happy/topologies/standalone/three_nodes_on_tap_wifi_weave.sh
@@ -19,6 +19,7 @@
 
 # Steps to manually build three_nodes_on_wifi_weave.json
 
+export PATH=$PATH:$(dirname $(readlink -f "$0"))/../../bin
 happy-node-add node01
 happy-node-add node02
 happy-node-add node03
diff --git a/src/test-apps/happy/topologies/standalone/three_nodes_on_thread_weave.sh b/src/test-apps/happy/topologies/standalone/three_nodes_on_thread_weave.sh
index c641ad2..e92d4e8 100755
--- a/src/test-apps/happy/topologies/standalone/three_nodes_on_thread_weave.sh
+++ b/src/test-apps/happy/topologies/standalone/three_nodes_on_thread_weave.sh
@@ -19,6 +19,7 @@
 
 # Steps to manually build three_nodes_on_thread_happy.json
 
+export PATH=$PATH:$(dirname $(readlink -f "$0"))/../../bin
 happy-node-add node01
 happy-node-add node02
 happy-node-add node03
diff --git a/src/test-apps/happy/topologies/standalone/three_nodes_on_wifi_weave.sh b/src/test-apps/happy/topologies/standalone/three_nodes_on_wifi_weave.sh
index 9c72bc9..83ad77f 100755
--- a/src/test-apps/happy/topologies/standalone/three_nodes_on_wifi_weave.sh
+++ b/src/test-apps/happy/topologies/standalone/three_nodes_on_wifi_weave.sh
@@ -19,6 +19,7 @@
 
 # Steps to manually build three_nodes_on_wifi_weave.json
 
+export PATH=$PATH:$(dirname $(readlink -f "$0"))/../../bin
 happy-node-add node01
 happy-node-add node02
 happy-node-add node03
diff --git a/src/test-apps/happy/topologies/standalone/two_nodes_on_wifi.sh b/src/test-apps/happy/topologies/standalone/two_nodes_on_wifi.sh
index ee82856..210d0b7 100755
--- a/src/test-apps/happy/topologies/standalone/two_nodes_on_wifi.sh
+++ b/src/test-apps/happy/topologies/standalone/two_nodes_on_wifi.sh
@@ -18,7 +18,7 @@
 #
 
 # Steps to manually build two_nodes_on_wifi.json
-
+export PATH=$PATH:$(dirname $(readlink -f "$0"))/../../bin
 happy-node-add 00-WifiNode-Tx
 happy-node-add 01-WifiNode-Rx