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/__init__.py b/serial/__init__.py
index c24ced8..dcd7c12 100644
--- a/serial/__init__.py
+++ b/serial/__init__.py
@@ -7,6 +7,8 @@
 #
 # SPDX-License-Identifier:    BSD-3-Clause
 
+from __future__ import absolute_import
+
 import sys
 import importlib
 
diff --git a/serial/rfc2217.py b/serial/rfc2217.py
index e8ddb7f..c35aa9b 100644
--- a/serial/rfc2217.py
+++ b/serial/rfc2217.py
@@ -58,6 +58,8 @@
 #   RFC).
 # the order of the options is not relevant
 
+from __future__ import absolute_import
+
 import logging
 import socket
 import struct
diff --git a/serial/rs485.py b/serial/rs485.py
index 2939350..d7aff6f 100644
--- a/serial/rs485.py
+++ b/serial/rs485.py
@@ -13,6 +13,8 @@
 NOTE: Some implementations may only support a subset of the settings.
 """
 
+from __future__ import absolute_import
+
 import time
 import serial
 
diff --git a/serial/serialcli.py b/serial/serialcli.py
index 0727a52..ddd0cdf 100644
--- a/serial/serialcli.py
+++ b/serial/serialcli.py
@@ -7,6 +7,8 @@
 #
 # SPDX-License-Identifier:    BSD-3-Clause
 
+from __future__ import absolute_import
+
 import System
 import System.IO.Ports
 from serial.serialutil import *
diff --git a/serial/serialjava.py b/serial/serialjava.py
index 7bd5b3e..9c920c5 100644
--- a/serial/serialjava.py
+++ b/serial/serialjava.py
@@ -7,6 +7,8 @@
 #
 # SPDX-License-Identifier:    BSD-3-Clause
 
+from __future__ import absolute_import
+
 from serial.serialutil import *
 
 
diff --git a/serial/serialposix.py b/serial/serialposix.py
index 3ac6283..82fe59a 100644
--- a/serial/serialposix.py
+++ b/serial/serialposix.py
@@ -26,6 +26,8 @@
 # - aix (AIX)               /dev/tty%d
 
 
+from __future__ import absolute_import
+
 # pylint: disable=abstract-method
 import errno
 import fcntl
diff --git a/serial/serialutil.py b/serial/serialutil.py
index 7d51752..e847a6a 100644
--- a/serial/serialutil.py
+++ b/serial/serialutil.py
@@ -7,6 +7,8 @@
 #
 # SPDX-License-Identifier:    BSD-3-Clause
 
+from __future__ import absolute_import
+
 import io
 import time
 
diff --git a/serial/serialwin32.py b/serial/serialwin32.py
index 7b88999..74bfd05 100644
--- a/serial/serialwin32.py
+++ b/serial/serialwin32.py
@@ -9,6 +9,8 @@
 #
 # Initial patch to use ctypes by Giovanni Bajo <rasky@develer.com>
 
+from __future__ import absolute_import
+
 # pylint: disable=invalid-name,too-few-public-methods
 import ctypes
 import time
diff --git a/serial/threaded/__init__.py b/serial/threaded/__init__.py
index 74b6924..9b8fa01 100644
--- a/serial/threaded/__init__.py
+++ b/serial/threaded/__init__.py
@@ -9,6 +9,8 @@
 """\
 Support threading with serial ports.
 """
+from __future__ import absolute_import
+
 import serial
 import threading
 
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
diff --git a/serial/urlhandler/protocol_alt.py b/serial/urlhandler/protocol_alt.py
index c14a87e..2e666ca 100644
--- a/serial/urlhandler/protocol_alt.py
+++ b/serial/urlhandler/protocol_alt.py
@@ -16,6 +16,8 @@
 #   use poll based implementation on Posix (Linux):
 #   python -m serial.tools.miniterm alt:///dev/ttyUSB0?class=PosixPollSerial
 
+from __future__ import absolute_import
+
 try:
     import urlparse
 except ImportError:
diff --git a/serial/urlhandler/protocol_hwgrep.py b/serial/urlhandler/protocol_hwgrep.py
index 49bbebe..1a288c9 100644
--- a/serial/urlhandler/protocol_hwgrep.py
+++ b/serial/urlhandler/protocol_hwgrep.py
@@ -20,6 +20,8 @@
 # n=<N>     pick the N'th entry instead of the first one (numbering starts at 1)
 # skip_busy tries to open port to check if it is busy, fails on posix as ports are not locked!
 
+from __future__ import absolute_import
+
 import serial
 import serial.tools.list_ports
 
diff --git a/serial/urlhandler/protocol_loop.py b/serial/urlhandler/protocol_loop.py
index 7bf6cf9..985e7a7 100644
--- a/serial/urlhandler/protocol_loop.py
+++ b/serial/urlhandler/protocol_loop.py
@@ -13,6 +13,8 @@
 # URL format:    loop://[option[/option...]]
 # options:
 # - "debug" print diagnostic messages
+from __future__ import absolute_import
+
 import logging
 import numbers
 import time
diff --git a/serial/urlhandler/protocol_rfc2217.py b/serial/urlhandler/protocol_rfc2217.py
index 1898803..8be310f 100644
--- a/serial/urlhandler/protocol_rfc2217.py
+++ b/serial/urlhandler/protocol_rfc2217.py
@@ -7,4 +7,6 @@
 #
 # SPDX-License-Identifier:    BSD-3-Clause
 
+from __future__ import absolute_import
+
 from serial.rfc2217 import Serial  # noqa
diff --git a/serial/urlhandler/protocol_socket.py b/serial/urlhandler/protocol_socket.py
index 5c77415..36cdf1f 100644
--- a/serial/urlhandler/protocol_socket.py
+++ b/serial/urlhandler/protocol_socket.py
@@ -16,6 +16,8 @@
 # options:
 # - "debug" print diagnostic messages
 
+from __future__ import absolute_import
+
 import errno
 import logging
 import select
diff --git a/serial/urlhandler/protocol_spy.py b/serial/urlhandler/protocol_spy.py
index 3479010..92aaa2e 100644
--- a/serial/urlhandler/protocol_spy.py
+++ b/serial/urlhandler/protocol_spy.py
@@ -20,6 +20,8 @@
 #   redirect output to an other terminal window on Posix (Linux):
 #   python -m serial.tools.miniterm spy:///dev/ttyUSB0?dev=/dev/pts/14\&color
 
+from __future__ import absolute_import
+
 import sys
 import time
 
diff --git a/serial/win32.py b/serial/win32.py
index 905ce0f..08b6e67 100644
--- a/serial/win32.py
+++ b/serial/win32.py
@@ -9,6 +9,8 @@
 
 # pylint: disable=invalid-name,too-few-public-methods,protected-access,too-many-instance-attributes
 
+from __future__ import absolute_import
+
 from ctypes import c_ulong, c_void_p, c_int64, c_char, \
                    WinDLL, sizeof, Structure, Union, POINTER
 from ctypes.wintypes import HANDLE