Thanks to all for your help it is now working, I rant he code through a
debugger and found that the input file I was using to create my list of
addresses to wget had newlines in them and were therefore breaking my
command line.
All your advice has been appreciated.
RiGGa
--
http://mail.python.o
Rigga wrote:
Tim Jarman wrote:
Rigga wrote:
Brian van den Broek wrote:
Rigga said unto the world upon 2005-02-27 15:04:
(snip stuff about raw strings)
Thanks for all your help with this it is appreciated, one further
question though, how do I pass a variable to the external program while
using
Rigga wrote:
(snip)
>>
> This is the command I am trying to run:
>
> feed is a list of web addresses
>
> output, input = popen2("wget -q %s -O - | tr '\r' '\n' | tr \' \" | sed -n
> 's/.*url="\([^"]*\)".*/\1/p'" % feed[counter])
>
> But it does not work, if I escape the string using r""" and
Tim Jarman wrote:
> Rigga wrote:
>
>> Brian van den Broek wrote:
>>
>>> Rigga said unto the world upon 2005-02-27 15:04:
>
> (snip stuff about raw strings)
>
>> Thanks for all your help with this it is appreciated, one further
>> question though, how do I pass a variable to the external progra
Rigga wrote:
> Brian van den Broek wrote:
>
>> Rigga said unto the world upon 2005-02-27 15:04:
(snip stuff about raw strings)
> Thanks for all your help with this it is appreciated, one further question
> though, how do I pass a variable to the external program while using the
> r"""
>
> Than
Brian van den Broek wrote:
> Rigga said unto the world upon 2005-02-27 15:04:
>> Tim Jarman wrote:
>
>
>
>>>No, the r was the point - it's there to tell Python not to do any
>>>escaping on the string. Try it again with the r and see what happens.
>>>
>>
>> Brilliant!!! that works a treat than
Rigga wrote:
>> No, the r was the point - it's there to tell Python not to do any
>> escaping on the string. Try it again with the r and see what happens.
>>
> Brilliant!!! that works a treat thankyou!!, where on earth did you find
> out
> about the 'r' any pointers to documentation appreciated.
Rigga said unto the world upon 2005-02-27 15:04:
Tim Jarman wrote:
No, the r was the point - it's there to tell Python not to do any escaping
on the string. Try it again with the r and see what happens.
Brilliant!!! that works a treat thankyou!!, where on earth did you find out
about the 'r' any
Tim Jarman wrote:
> Rigga wrote:
>
>> Pink wrote:
>>
>>> Rigga wrote:
>>>
Hi,
I am running the line of code below from a shell script and it works
fine, however I am at a total loss on how i can run it from within a
Python script as every option I have tried fails and
Rigga wrote:
> Pink wrote:
>
>> Rigga wrote:
>>
>>> Hi,
>>>
>>> I am running the line of code below from a shell script and it works
>>> fine, however I am at a total loss on how i can run it from within a
>>> Python script as every option I have tried fails and it appears to be
>>> down to the
I'm using wget from Python to get extactly one line from a reports page.
I made this function that works for me:
def wgetline(exp): # see Python Cookbook p. 228
print "Getting result from server ..."
command = 'wget -q -O - \
http://www.foobar.com/report.pl\?UserID=xxx\&UserPW=xxx
Pink wrote:
> Rigga wrote:
>
>> Hi,
>>
>> I am running the line of code below from a shell script and it works
>> fine, however I am at a total loss on how i can run it from within a
>> Python script as every option I have tried fails and it appears to be
>> down to the escaping of certain chara
Rigga wrote:
> Hi,
>
> I am running the line of code below from a shell script and it works fine,
> however I am at a total loss on how i can run it from within a Python
> script as every option I have tried fails and it appears to be down to the
> escaping of certain characters.
>
> wget -q www
Hi,
I am running the line of code below from a shell script and it works fine,
however I am at a total loss on how i can run it from within a Python
script as every option I have tried fails and it appears to be down to the
escaping of certain characters.
wget -q www.anywebpage.com -O - | tr '\r'
14 matches
Mail list logo