Issue
In the documentation at IPython Tips & Tricks, it says to put a semicolon (;) at the end of a command to suppress its output. This does not seem to work in my case as even a
print('Hello');
outputs
Hello
Do I have the wrong idea of output suppression or is this a bug? This is especially annoying when working in PuDB, as it flashes horribly in my case as I press 'next' or 'step into'.
P.S.: The output is neither on my Ubuntu IPython 0.10 nor OS X v10.7 (Lion) IPython 0.11 suppressed. Although the flashing issue is worse in OS X, probably because of item2.
Solution
Try something like 1 + 1;
. Without the semicolon, it should give you feedback about the result by printing it (formatted by repr
, though it doesn't matter in the case of integers) - I assume that it's this output that's supposed to be suppressed.
The shell doesn't (and shouldn't) suppress writing to the file that happens to be referenced by sys.stdout
(which is essentially what print
does). This is an entirely different matter, and not the job of the shell.
Answered By - user395760
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.