stdout and stderr anomalies
Posted
by momo
on Stack Overflow
See other posts from Stack Overflow
or by momo
Published on 2010-06-07T12:48:56Z
Indexed on
2010/06/07
12:52 UTC
Read the original article
Hit count: 356
python
from the interactive prompt:
>>> import sys
>>> sys.stdout.write('is the')
is the6
what is '6' doing there?
another example:
>>> for i in range(3):
... sys.stderr.write('new black')
...
9
9
9
new blacknew blacknew black
where are the numbers coming from?
© Stack Overflow or respective owner