We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5619544 commit 2deadfeCopy full SHA for 2deadfe
bpython/curtsiesfrontend/sitefix.py
@@ -3,6 +3,8 @@
3
4
from six.moves import builtins
5
6
+from bpython import py3
7
+
8
9
def resetquit(builtins):
10
"""Redefine builtins 'quit' and 'exit' not so close stdin
@@ -18,8 +20,11 @@ def monkeypatch_quit():
18
20
if 'site' in sys.modules:
19
21
resetquit(builtins)
22
-
-orig_reload = builtins.reload
23
+if py3:
24
+ import importlib
25
+ orig_reload = importlib.reload
26
+else:
27
+ orig_reload = builtins.reload
28
29
30
def reload(module):
@@ -39,4 +44,7 @@ def reload(module):
39
44
40
45
41
46
def monkeypatch_reload():
42
- builtins.reload = reload
47
+ if py3:
48
+ importlib.reload = reload
49
+ else:
50
+ builtins.reload = reload
0 commit comments