Skip to content

Commit

Permalink
remove relative import, replace with absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
zsquareplusc committed Sep 30, 2015
1 parent 6dcdeda commit 168704f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions serial/tools/miniterm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@

import serial
from serial.tools.list_ports import comports
from serial.tools import hexlify_codec

codecs.register(lambda c: hexlify_codec.getregentry() if c == 'hexlify' else None)

try:
raw_input
except NameError:
raw_input = input # in python3 it's "raw"
unichr = chr

from . import hexlify_codec
codecs.register(lambda c: hexlify_codec.getregentry() if c == 'hexlify' else None)


def key_description(character):
"""generate a readable description for a key"""
Expand Down Expand Up @@ -96,7 +96,7 @@ def __init__(self):
# the change of the code page is not propagated to Python, manually fix it
sys.stderr = codecs.getwriter('UTF-8')(Out(sys.stderr.fileno()), 'replace')
sys.stdout = self.output
self.output.encoding = 'UTF-8' # needed for input
self.output.encoding = 'UTF-8' # needed for input

def __del__(self):
ctypes.windll.kernel32.SetConsoleOutputCP(self._saved_ocp)
Expand Down

0 comments on commit 168704f

Please sign in to comment.