7 files changed
@@ -26,6 +26,7 @@ | |||
| 26 | 26 | import keyword | |
| 27 | 27 | import os | |
| 28 | 28 | import rlcompleter | |
| 29 | + from six.moves import range, builtins | ||
| 29 | 30 | ||
| 30 | 31 | from glob import glob | |
| 31 | 32 | ||
@@ -35,11 +36,6 @@ | |||
| 35 | 36 | from bpython._py3compat import py3 | |
| 36 | 37 | from bpython.lazyre import LazyReCompile | |
| 37 | 38 | ||
| 38 | - try: | ||
| 39 | - import builtins | ||
| 40 | - except ImportError: | ||
| 41 | - import __builtin__ as builtins | ||
| 42 | - | ||
| 43 | 39 | ||
| 44 | 40 | # Autocomplete modes | |
| 45 | 41 | SIMPLE = 'simple' | |
@@ -60,6 +60,7 @@ | |||
| 60 | 60 | ||
| 61 | 61 | import locale | |
| 62 | 62 | from types import ModuleType | |
| 63 | + from six.moves import range | ||
| 63 | 64 | ||
| 64 | 65 | # These are used for syntax highlighting | |
| 65 | 66 | from pygments import format | |
@@ -1,3 +1,4 @@ | |||
| 1 | + # -*- coding: utf-8 -*- | ||
| 1 | 2 | import contextlib | |
| 2 | 3 | import errno | |
| 3 | 4 | import functools | |
@@ -12,6 +13,7 @@ | |||
| 12 | 13 | import threading | |
| 13 | 14 | import time | |
| 14 | 15 | import unicodedata | |
| 16 | + from six.moves import range | ||
| 15 | 17 | ||
| 16 | 18 | from pygments import format | |
| 17 | 19 | from bpython._py3compat import PythonLexer | |
@@ -2,6 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | 3 | import logging | |
| 4 | 4 | import itertools | |
| 5 | + from six.moves import range | ||
| 5 | 6 | ||
| 6 | 7 | from curtsies import fsarray, fmtstr | |
| 7 | 8 | from curtsies.formatstring import linesplit | |
@@ -24,6 +24,7 @@ | |||
| 24 | 24 | import codecs | |
| 25 | 25 | import os | |
| 26 | 26 | from itertools import islice | |
| 27 | + from six.moves import range | ||
| 27 | 28 | ||
| 28 | 29 | from bpython.translations import _ | |
| 29 | 30 | from bpython.filelock import FileLock | |
@@ -22,6 +22,7 @@ | |||
| 22 | 22 | # | |
| 23 | 23 | ||
| 24 | 24 | import string | |
| 25 | + from six.moves import range | ||
| 25 | 26 | ||
| 26 | 27 | ||
| 27 | 28 | class KeyMap: | |
@@ -46,6 +47,7 @@ def __delitem__(self, key): | |||
| 46 | 47 | def __setitem__(self, key, value): | |
| 47 | 48 | self.map[key] = value | |
| 48 | 49 | ||
| 50 | + | ||
| 49 | 51 | cli_key_dispatch = KeyMap(tuple()) | |
| 50 | 52 | urwid_key_dispatch = KeyMap('') | |
| 51 | 53 | ||
@@ -42,6 +42,7 @@ | |||
| 42 | 42 | import signal | |
| 43 | 43 | from types import ModuleType | |
| 44 | 44 | from optparse import Option | |
| 45 | + from six.moves import range | ||
| 45 | 46 | ||
| 46 | 47 | from pygments.token import Token | |
| 47 | 48 | ||
0 commit comments