[Tutor] Suppressing output in interactive mode
Alan Gauld
alan.gauld at btinternet.com
Fri Jan 11 19:17:39 CET 2008
"Olivier Lefevre" <lefevrol at yahoo.com> wrote
> This is stupid but my python is rusty I can neither
> remember nor find out anew how to enter an expression
> that returns a value w/o being seeing the result printed.
I don;t understand the question.
Are you talking about the >>> prompt?
That is the only place I can think of where expression values
are displayed without an explicit print statement. In a normal
script unassigned expressions are evaluated but the result
is discarded (except for the magic _ variable which is not
displayed)
> don't necessarily want to suppress all output, just
> just for certain expressions (e.g., within a loop,
> so as not to get flooded).
But if you refer to a loop when would you ever be evaluating
expressions inside a loop without assigning them?
Can you give an example of the problem and what your like
to see? I don;t understand what you are trying to do, or
where the problem lies.
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list