diff --git a/IPython/extensions/autoreload.py b/IPython/extensions/autoreload.py index e62a5fb..2080bc4 100644 --- a/IPython/extensions/autoreload.py +++ b/IPython/extensions/autoreload.py @@ -103,6 +103,10 @@ skip_doctest = True import time, os, threading, sys, types, imp, inspect, traceback, atexit import weakref +try: + reload +except NameError: + from imp import reload def _get_compiled_ext(): """Official way to get the extension of compiled files (.pyc or .pyo)""" diff --git a/IPython/utils/process.py b/IPython/utils/process.py index abc58bc..61469de 100644 --- a/IPython/utils/process.py +++ b/IPython/utils/process.py @@ -66,7 +66,7 @@ def find_cmd(cmd): except OSError: raise FindCmdError('command could not be found: %s' % cmd) # which returns empty if not found - if path == b'': + if path == '': raise FindCmdError('command could not be found: %s' % cmd) return os.path.abspath(path) diff --git a/IPython/utils/tests/test_process.py b/IPython/utils/tests/test_process.py index d40dc46..cbde427 100644 --- a/IPython/utils/tests/test_process.py +++ b/IPython/utils/tests/test_process.py @@ -37,7 +37,7 @@ def test_find_cmd_python(): def test_find_cmd_ls(): """Make sure we can find the full path to ls.""" path = find_cmd('ls') - nt.assert_true(path.endswith(b'ls')) + nt.assert_true(path.endswith('ls')) def has_pywin32():