##// END OF EJS Templates
Collapse user home directory to ~ in info filename
Thomas Kluyver -
Show More
@@ -36,6 +36,7 b' from IPython.utils import io'
36 from IPython.utils import openpy
36 from IPython.utils import openpy
37 from IPython.utils import py3compat
37 from IPython.utils import py3compat
38 from IPython.utils.dir2 import safe_hasattr
38 from IPython.utils.dir2 import safe_hasattr
39 from IPython.utils.path import compress_user
39 from IPython.utils.text import indent
40 from IPython.utils.text import indent
40 from IPython.utils.wildcard import list_namespace
41 from IPython.utils.wildcard import list_namespace
41 from IPython.utils.coloransi import TermColors, ColorScheme, ColorSchemeTable
42 from IPython.utils.coloransi import TermColors, ColorScheme, ColorSchemeTable
@@ -741,7 +742,7 b' class Inspector:'
741 binary_file = True
742 binary_file = True
742 elif fname.endswith('<string>'):
743 elif fname.endswith('<string>'):
743 fname = 'Dynamically generated function. No source code available.'
744 fname = 'Dynamically generated function. No source code available.'
744 out['file'] = fname
745 out['file'] = compress_user(fname)
745
746
746 # Original source code for a callable, class or property.
747 # Original source code for a callable, class or property.
747 if detail_level:
748 if detail_level:
General Comments 0
You need to be logged in to leave comments. Login now