##// 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
embed1.py
10 lines | 221 B | text/x-python | PythonLexer
"""This tests standard embedding, automatically detecting the module and
local namespaces."""
f = set([1,2,3,4,5])
def bar(foo):
import IPython
IPython.embed(banner1='check f in globals, foo in locals')
bar(f)