Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #47485
| References | <cd1be83a-f560-4024-90b3-697a51bb1bb0@g7g2000vbv.googlegroups.com> |
|---|---|
| Date | 2013-06-09 21:00 +0100 |
| Subject | Re: [newbie] problem with if then |
| From | Fábio Santos <fabiosantosart@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2932.1370808058.3114.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
On 9 Jun 2013 20:49, "Jean Dubois" <jeandubois314@gmail.com> wrote: > > I'm writing some code to check whether an url is available or not, > therefore I make use of a wget-command in Linux and then check whether > this is successful (returning a 0) or not returning an 8 > However the if then statement seems to give the same result in both > cases: Which result? Failure, or success? Have you tried printing the checkavailablestring string and running that command exactly? There may be something wrong with the command or URL in some way, and calling os.system instead of using the shell directly will hide any errors from you.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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