##// END OF EJS Templates
Backport PR #8614: Safely encode paths in IPython.utils.path.compress_user...
Backport PR #8614: Safely encode paths in IPython.utils.path.compress_user This is a minor bugfix that resolves an issue on Python 2 on Windows systems with non-ascii home folders. On these systems, when IPython tries to show a tooltip for a function from a non-ascii location, a `UnicodeDecodeError` is triggered. This appears to be related to issue #8543. I think this is a safe bugfix, as the old behavior is clearly incorrect on Python 2, and the change does nothing on Python 3. I have given it a few test runs. The relevant line is 85. I apologize for the other (unnecessary) line changes; Atom stripped the trailing tabs automatically.

File last commit:

r16114:15cc5a8e
r21521:a4080c85
Show More
embed2.py
5 lines | 220 B | text/x-python | PythonLexer
"""This tests passing a dict for the user_ns at shell instantiation."""
from IPython import embed
user_ns = dict(cookie='monster')
embed(user_ns=user_ns, banner1="check 'cookie' present, locals and globals equivalent")