Use absolute import everywhere
This prevents Python 2.7 from attempting to import system modules
like sys and ctypes from the 'serial' directory.
diff --git a/serial/tools/hexlify_codec.py b/serial/tools/hexlify_codec.py
index 1371da2..bd8f6b0 100644
--- a/serial/tools/hexlify_codec.py
+++ b/serial/tools/hexlify_codec.py
@@ -18,6 +18,8 @@
"""
+from __future__ import absolute_import
+
import codecs
import serial
diff --git a/serial/tools/list_ports.py b/serial/tools/list_ports.py
index 827e81f..0d7e3d4 100644
--- a/serial/tools/list_ports.py
+++ b/serial/tools/list_ports.py
@@ -16,6 +16,8 @@
based on their descriptions or hardware ID.
"""
+from __future__ import absolute_import
+
import sys
import os
import re
diff --git a/serial/tools/list_ports_common.py b/serial/tools/list_ports_common.py
index aa91e5e..1781929 100644
--- a/serial/tools/list_ports_common.py
+++ b/serial/tools/list_ports_common.py
@@ -7,6 +7,9 @@
# (C) 2015 Chris Liechti <cliechti@gmx.net>
#
# SPDX-License-Identifier: BSD-3-Clause
+
+from __future__ import absolute_import
+
import re
import glob
import os
diff --git a/serial/tools/list_ports_linux.py b/serial/tools/list_ports_linux.py
index 4ee7877..3f7eadb 100644
--- a/serial/tools/list_ports_linux.py
+++ b/serial/tools/list_ports_linux.py
@@ -8,6 +8,8 @@
#
# SPDX-License-Identifier: BSD-3-Clause
+from __future__ import absolute_import
+
import glob
import os
from serial.tools import list_ports_common
diff --git a/serial/tools/list_ports_osx.py b/serial/tools/list_ports_osx.py
index 79ce4f1..f46a820 100644
--- a/serial/tools/list_ports_osx.py
+++ b/serial/tools/list_ports_osx.py
@@ -21,6 +21,8 @@
# Also see the 'IORegistryExplorer' for an idea of what we are actually searching
+from __future__ import absolute_import
+
import ctypes
import ctypes.util
diff --git a/serial/tools/list_ports_posix.py b/serial/tools/list_ports_posix.py
index 0d580b0..79bc8ed 100644
--- a/serial/tools/list_ports_posix.py
+++ b/serial/tools/list_ports_posix.py
@@ -16,6 +16,8 @@
currently just identical to the port name.
"""
+from __future__ import absolute_import
+
import glob
import sys
import os
diff --git a/serial/tools/list_ports_windows.py b/serial/tools/list_ports_windows.py
index f28047b..9159f5d 100644
--- a/serial/tools/list_ports_windows.py
+++ b/serial/tools/list_ports_windows.py
@@ -8,6 +8,8 @@
#
# SPDX-License-Identifier: BSD-3-Clause
+from __future__ import absolute_import
+
# pylint: disable=invalid-name,too-few-public-methods
import re
import ctypes
diff --git a/serial/tools/miniterm.py b/serial/tools/miniterm.py
index 812f146..b0804ba 100644
--- a/serial/tools/miniterm.py
+++ b/serial/tools/miniterm.py
@@ -7,6 +7,8 @@
#
# SPDX-License-Identifier: BSD-3-Clause
+from __future__ import absolute_import
+
import codecs
import os
import sys