Re: use lines as argument to a command

2007-10-15 Thread Amit Khemka
On 10/16/07, Shoryuken <[EMAIL PROTECTED]> wrote: > > I guess that you want to loop over a file and for each line in the > > file you want to call some > > external program with the line as the argument. > > > > Have a look at subprocess module > > http://docs.python.org/lib/module-subprocess.html

Re: use lines as argument to a command

2007-10-15 Thread Shoryuken
> I guess that you want to loop over a file and for each line in the > file you want to call some > external program with the line as the argument. > > Have a look at subprocess module > http://docs.python.org/lib/module-subprocess.html > > If there is some else that you meant, please specify . >

Re: use lines as argument to a command

2007-10-15 Thread Amit Khemka
On 10/15/07, Shoryuken <[EMAIL PROTECTED]> wrote: > I'm new to Python, so my question may sounds naive. Here is it. > > I have a text file like this: > > www.a.com > www.b.com > www.c.com > ... > > I want to read one line from this file at a time, which I know how to > do. And use it as an argument

use lines as argument to a command

2007-10-14 Thread Shoryuken
I'm new to Python, so my question may sounds naive. Here is it. I have a text file like this: www.a.com www.b.com www.c.com ... I want to read one line from this file at a time, which I know how to do. And use it as an argument to a command, for example, telnet www.a.com and so on. However I hav