On 9 jun, 23:35, Roy Smith wrote:
> In article
> <20165c85-4cc3-4b79-943b-82443e4a9...@w7g2000vbw.googlegroups.com>,
> Jean Dubois wrote:
>
> > But, really,
> > > once you've done all that (and it's worth doing as an exercise), rewrite
> > > your code to use urllib2 or requests. It'll be a lot
In article
<20165c85-4cc3-4b79-943b-82443e4a9...@w7g2000vbw.googlegroups.com>,
Jean Dubois wrote:
> But, really,
> > once you've done all that (and it's worth doing as an exercise), rewrite
> > your code to use urllib2 or requests. It'll be a lot easier.
>
> Could you show me how to code the
On 9 jun, 22:23, Roy Smith wrote:
> 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
On 9 jun, 22:29, Fábio Santos wrote:
> 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/E...>
> >/dev/null ; echo $?
> > 8
> > 2013-06-07 22:07:00.016807 stream
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
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.deredac
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, 22:00, Fábio Santos wrote:
> 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
> >
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/
10 matches
Mail list logo