[Tutor] Running Python in script vs. Idle
Steve Willoughby
steve at alchemy.com
Mon Jul 25 01:29:42 CEST 2011
On 24-Jul-11 16:21, brandon w wrote:
> Then I try to run it from a script in Gnome-terminal and it does not
> run. I do not get output. I have to add print. to get any output like this:
When you type a Python expression at the interactive prompt in IDLE or
the python command-line interpreter, it will take the extra step of
printing the value of that expression for you.
That's not otherwise how Python works. Normally you have to use a print
command (or print() function in Python 3.x) to actually see the output.
--
Steve Willoughby / steve at alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
More information about the Tutor
mailing list