在pycharm中,ipython控制台似乎不是真正的ipython控制台。
在pycharm ipython控制台中:
In[1]: ?sorted
{'text/plain': 'Signature: sorted(iterable, key=None, reverse=False)\nDocstring:\nReturn a ne
在真实的ipython控制台中:
In [5]: ?sorted
Signature: sorted(iterable, key=None, reverse=False)
Docstring:
Return a new list containing all items from the iterable in ascending order.
A custom key function can be supplied to customise the sort order, and the
reverse flag can be set to request the result in descending order.
Type: builtin_function_or_method
我看到了其他一些不同之处:does not load ipython profile
、different behavior when using shortcut to get back previous commands
在pycharm中有没有真正的ipython控制台?并且此控制台仍然与在控制台中运行所选代码的快捷方式兼容。
发布于 2017-06-06 12:07:46
会不会是,你在PyCharm和本地使用了不同的虚拟环境/python版本?这可以完美地解释输出中的差异。
您是否可以在这两个环境中运行此代码并比较输出:
import IPython; IPython.version_info
编辑
确认后,即使版本相同,PyCharm也会转换ipython
的输出。
https://stackoverflow.com/questions/44388352
复制