[Tutor] Interacting with stderr
Danny Yoo
dyoo at hashcollision.org
Sat Aug 30 00:06:41 CEST 2014
On Fri, Aug 29, 2014 at 2:13 PM, Crush <crushed26 at gmail.com> wrote:
> I am now able to print stderr to the screen, however I still can not run
> conditional statements against stderr.
>
> Please see the screenshots(SS) here...
>
> https://www.dropbox.com/sh/31wyjtvqymo94uk/AAAZaxwB27nw1nmz7tz69I5La?dl=0
Hi Bo,
Consider case sensitivity.
################
>>> "a" == "A"
False
################
Also, in the screenshots you're presenting, you very much should want
to do a copy-and-paste of the text content and include it in your
question text. The reason is because, for all the Tutor folks who
aren't in a GUI right now, they can't see your program.
For the sake of the others on the list: your first screenshot has the following:
##########################
for line in p.stderr:
print line
if "segmentation" in line:
print "Yes it is"
...
###########################
and your second screenshot has the content:
##############################
...
11265 Segmentation fault | ./bmdplay -m 12 -f pipe:0
Gave up
##############################
More information about the Tutor
mailing list