From dae991a8903d45b57d230cc5330cf5e7df1aa3db 2015-02-28 19:07:32 From: Thomas Kluyver Date: 2015-02-28 19:07:32 Subject: [PATCH] Collapse user home directory to ~ in info filename --- diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index 6d65069..8bb1a91 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -36,6 +36,7 @@ from IPython.utils import io from IPython.utils import openpy from IPython.utils import py3compat from IPython.utils.dir2 import safe_hasattr +from IPython.utils.path import compress_user from IPython.utils.text import indent from IPython.utils.wildcard import list_namespace from IPython.utils.coloransi import TermColors, ColorScheme, ColorSchemeTable @@ -741,7 +742,7 @@ class Inspector: binary_file = True elif fname.endswith(''): fname = 'Dynamically generated function. No source code available.' - out['file'] = fname + out['file'] = compress_user(fname) # Original source code for a callable, class or property. if detail_level: