How to hide python startup information?

When I write "python" and return to the shell, the following lines come out:

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. 

How to suppress these lines?

+4
source share
1 answer

An easy way is to call Python like python -i -c "" . However, this will also disable any startup scripts. If you have a script running, you can also use python -i ~/.pythonrc.py (or, however, the name of the script).

+7
source

Source: https://habr.com/ru/post/1398432/


All Articles