[Python-ideas] python -c "..." should output result like the interpreter
fuzzyman at voidspace.org.uk
Wed Dec 29 14:36:53 CET 2010
I often use python as a calculator or for simple operations using -c. It
would be enormously useful if python -c "..." would output on stdout the
result of the last evaluated expression in the same way that the interactive
The following outputs nothing:
python -c "12 / 4.1"
So you always have to prefix expressions with print to see the result.
May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas