Python quiet start

Is there a way to start python quietly, perhaps by setting some environment variable or by providing a command line option? Instead of this:

wim@SDFA100461C :/tmp$ python Python 2.7.5+ (default, Sep 19 2013, 13:48:49) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 

Sometimes I need this behavior, right at the tip:

 wim@SDFA100461C :/tmp$ python >>> 

I will also be interested in the answer for ipython .

+6
source share
1 answer

This seems like a trick:

 C:\Users\Bartek>python -i -c "" >>> print "I ♥ Python!" I ♥ Python! >>> exit() C:\Users\Bartek> 

The -i option is described as:

-i: check interactively after running the script; forces quickly if stdin is not a terminal; also PYTHONINSPECT = x

So, while you are at the terminal, it has no reservations.

ipython has a simple option --no-banner :

 C:\Users\Bartek>ipython --no-banner In [1]: print "I <3 Python!" I <3 Python! In [2]: exit() C:\Users\Bartek> 

It doesn't seem to support Unicode, though;)

+6
source

All Articles