Jean Dubois 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 comma
In article
,
Jean Dubois 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
In general, "shelling out" to run a command-line utility should be the
last resort. It's slower,
On 9 Jun 2013 20:49, "Jean Dubois" 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 sam
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:
Here is my code:
#!/usr/bin/