<p dir="ltr"><br>
On 9 Jun 2013 20:49, "Jean Dubois" <<a href="mailto:jeandubois314@gmail.com">jeandubois314@gmail.com</a>> wrote:<br>
><br>
> I'm writing some code to check whether an url is available or not,<br>
> therefore I make use of a wget-command in Linux and then check whether<br>
> this is successful (returning a 0) or not returning an 8<br>
> However the if then statement seems to give the same result in both<br>
> cases:</p>
<p dir="ltr">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.</p>