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


Groups > comp.lang.python > #47492

Re: [newbie] problem with if then

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <albert@fsfe.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.196
X-Spam-Level *
X-Spam-Evidence '*H*': 0.65; '*S*': 0.05; 'subject:: [': 0.04; 'exit': 0.09; 'wrote:': 0.18; 'subject:] ': 0.20; 'header:User- Agent:1': 0.23; 'subject:problem': 0.24; 'header:In-Reply-To:1': 0.27; 'code': 0.31; 'jean': 0.31; 'problem': 0.35; 'subject:with': 0.35; 'agree': 0.35; 'really': 0.36; 'hi,': 0.36; 'received:10': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'chain': 0.60; 'commands': 0.60; 'here': 0.66; 'url:be': 0.68; 'yours': 0.88; 'albert': 0.91; 'shell,': 0.91
X-Virus-Scanned Debian amavisd-new at free-minds.net
User-Agent K-9 Mail for Android
In-Reply-To <cd1be83a-f560-4024-90b3-697a51bb1bb0@g7g2000vbv.googlegroups.com>
References <cd1be83a-f560-4024-90b3-697a51bb1bb0@g7g2000vbv.googlegroups.com>
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Subject Re: [newbie] problem with if then
From Albert Dengg <albert@fsfe.org>
Date Sun, 09 Jun 2013 22:37:09 +0200
To python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2937.1370810586.3114.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1370810586 news.xs4all.nl 16011 [2001:888:2000:d::a6]:60200
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:47492

Show key headers only | View raw


Jean Dubois <jeandubois314@gmail.com> wrote:
...
>     checkavailablestring='wget -q -O -
>http://www.deredactie.be/cm/vrtnieuws/videozone/programmas/journaal/EP_'+thisday.strftime("%y%m%d")+'_JO7
>>/dev/null ; echo $?'
The problem schould be the echo:
Since os.system returns the exit code of the shell, when chaining commands with ; it returns the exit status of the last command,in your case the echo.
So,if you really want to go with wget here,
Either drop the echo or chain with &&

Yours
Albert
Hi,
While i agree that calling wget here is not optimal....

Back to comp.lang.python | Previous | NextPrevious 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