diff options
Diffstat (limited to 'gkeys/gkeys')
-rw-r--r-- | gkeys/gkeys/__init__.py | 8 | ||||
-rw-r--r-- | gkeys/gkeys/actions.py | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/gkeys/gkeys/__init__.py b/gkeys/gkeys/__init__.py index 05fc730..a1e901c 100644 --- a/gkeys/gkeys/__init__.py +++ b/gkeys/gkeys/__init__.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- +import sys from collections import OrderedDict @@ -11,6 +12,13 @@ from gkeys.action_map import Action_Map, Available_Actions __version__ = '0.2' __license__ = 'GPLv2' +if sys.version_info[0] >= 3: + py_input = input + _unicode = str +else: + py_input = raw_input + _unicode = unicode + subdata = OrderedDict() for cmd in Available_Actions: diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py index 71ed081..64d6123 100644 --- a/gkeys/gkeys/actions.py +++ b/gkeys/gkeys/actions.py @@ -15,18 +15,11 @@ from __future__ import print_function import itertools import os -import sys - -if sys.version_info[0] >= 3: - py_input = input - _unicode = str -else: - py_input = raw_input - _unicode = unicode from collections import defaultdict +from gkeys import _unicode, py_input from gkeys.actionbase import ActionBase from gkeys.gkey import GKEY from gkeys.checks import SPECCHECK_SUMMARY, convert_pf, convert_yn |