diff --git a/progressbar/utils.py b/progressbar/utils.py index a969484a..5e2043ef 100644 --- a/progressbar/utils.py +++ b/progressbar/utils.py @@ -157,7 +157,8 @@ def get_terminal_size(): # pragma: no cover try: # Default to 79 characters for IPython notebooks - ipython = globals().get('get_ipython')() + from IPython import get_ipython + ipython = get_ipython() from ipykernel import zmqshell if isinstance(ipython, zmqshell.ZMQInteractiveShell): return 79, 24