如何压制python的启动信息?

upd*_*liu 4 python

当我输入"python"并返回shell时,会出现以下行:

Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Run Code Online (Sandbox Code Playgroud)

如何压抑这些线?

Sve*_*ach 7

一种简单的方法是将Python称为python -i -c "".但是,这也将禁用任何启动脚本.如果您有一个启动脚本,您也可以使用python -i ~/.pythonrc.py(或者该脚本已命名).