GeezerVison is showing github.com — Use six.moves.range and six.moves.builtins · pp1992m/bpython@13092bc
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: bpython/autocomplete.py +1-5Lines changed: 1 addition & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
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 | 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' |
|
Collapse file
Copy file name to clipboardExpand all lines: bpython/cli.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
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 |
|
Collapse file
Copy file name to clipboardExpand all lines: bpython/curtsiesfrontend/repl.py +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +# -*- coding: utf-8 -*- |
1 | 2 | import contextlib |
2 | 3 | import errno |
3 | 4 | import functools |
|
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 |
|
Collapse file
Copy file name to clipboardExpand all lines: bpython/curtsiesfrontend/replpainter.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
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 |
|
Collapse file
Copy file name to clipboardExpand all lines: bpython/history.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
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 |
|
Collapse file
Copy file name to clipboardExpand all lines: bpython/keys.py +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
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 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: bpython/urwid.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
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 |
|
|