如何在 Ipython 中标准打印 `dir()` 和其他调用

How to standard-print `dir()` and other calls in Ipython

所以通常 Ipython 在单列列表中打印结果:

In [155]: dir()
Out[155]: 
['In',
 'Out',
 '_',
 '_100',
 '_101',
 '_102',

等我如何以正常的交互式-shell 格式打印它?

>>> dir()
['__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__spec__']

只是print它:

In [1]: print(dir())
['In', 'Out', '_', '__', '___', '__builtin__', '__builtins__', '__doc__', '__name__', '_dh', '_i', '_i1', '_ih', '_ii', '_iii', '_oh', '_sh', 'exit', 'get_ipython', 'quit']