【问题标题】:How does `cat` work in ipython interactive shell?`cat` 在 ipython 交互式 shell 中如何工作?
【发布时间】:2012-06-01 10:46:54
【问题描述】:

我注意到在文件上使用cat 在 ipython 中有效。它似乎没有被列为魔术命令......所以我很困惑它是如何/为什么工作的。是什么让cat 在 ipython 交互式 shell 中工作?

【问题讨论】:

    标签: python shell ipython interactive


    【解决方案1】:

    IPython 自动定义了一些 shell 别名,包括cat、in IPython.core.alias.default_aliases()。

    【讨论】:

      【解决方案2】:

      cat 是预定义的系统命令别名之一。输入 %alias 以查看当前 ipython 会话中的别名列表。

      【讨论】:

        猜你喜欢
        • 2011-03-12
        • 1970-01-01
        • 2010-10-31
        • 2022-01-10
        • 2011-07-24
        • 2013-01-25
        • 2017-11-24
        • 2021-02-10
        • 2013-11-28
        相关资源
        最近更新 更多