Is there a way to startup python quietly, perhaps by setting some environment variable or supplying command line option? Instead of seeing 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 want this behaviour, straight to the prompt:
wim@SDFA100461C:/tmp$ python
>>>
I would also be interested in an answer for ipython
.
This seems to do the trick:
C:\Users\Bartek>python -i -c ""
>>> print "I ♥ Python!"
I ♥ Python!
>>> exit()
C:\Users\Bartek>
The -i
option is described as:
-i : inspect interactively after running script; forces a prompt even if stdin does not appear to be a terminal; also PYTHONINSPECT=x
So as long as you're on a terminal, it doesn't seem to have any caveats.
ipython
has a straightforward --no-banner
option:
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 ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With