Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #47490

Re: problem with if then

References <cd1be83a-f560-4024-90b3-697a51bb1bb0@g7g2000vbv.googlegroups.com> <mailman.2932.1370808058.3114.python-list@python.org> <2cb97d50-87b1-4173-a4d9-0cb4342bfd5f@g2g2000vbk.googlegroups.com>
Date 2013-06-09 21:29 +0100
Subject Re: problem with if then
From Fábio Santos <fabiosantosart@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2935.1370809789.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 9 Jun 2013 21:24, "Jean Dubois"
...
> And here is the result:
>
> jean@antec4:~$ ./try.py
> wget -q -O -
http://www.deredactie.be/cm/vrtnieuws/videozone/programmas/journaal/EP_130607_JO7
> >/dev/null ; echo $?
> 8
> 2013-06-07 22:07:00.016807 stream is available
> wget -q -O -
http://www.deredactie.be/cm/vrtnieuws/videozone/programmas/journaal/EP_130608_JO7
> >/dev/null ; echo $?
> 8
> 2013-06-08 22:07:00.016795 stream is available
> wget -q -O -
http://www.deredactie.be/cm/vrtnieuws/videozone/programmas/journaal/EP_130609_JO7
> >/dev/null ; echo $?
> 0
> 2013-06-09 22:07:00.016763 stream is available
>

You don't need to echo the return code. os.system should return that as an
int.

The problem might be that os.system is returning the result from the echo
command instead.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[newbie] problem with if then Jean Dubois <jeandubois314@gmail.com> - 2013-06-09 12:44 -0700
  Re: [newbie] problem with if then Fábio Santos <fabiosantosart@gmail.com> - 2013-06-09 21:00 +0100
    Re: problem with if then Jean Dubois <jeandubois314@gmail.com> - 2013-06-09 13:15 -0700
      Re: problem with if then Fábio Santos <fabiosantosart@gmail.com> - 2013-06-09 21:29 +0100
        Re: problem with if then Jean Dubois <jeandubois314@gmail.com> - 2013-06-09 13:51 -0700
  Re: [newbie] problem with if then Roy Smith <roy@panix.com> - 2013-06-09 16:23 -0400
    Re: problem with if then Jean Dubois <jeandubois314@gmail.com> - 2013-06-09 14:00 -0700
      Re: problem with if then Roy Smith <roy@panix.com> - 2013-06-09 17:35 -0400
        Re: problem with if then Jean Dubois <jeandubois314@gmail.com> - 2013-06-10 00:46 -0700
  Re: [newbie] problem with if then Albert Dengg <albert@fsfe.org> - 2013-06-09 22:37 +0200

csiph-web