use lines as argument to a command

Shoryuken sakradevanamindra at gmail.com
Sun Oct 14 23:47:49 EDT 2007


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 have no idea how to do this task.

My purpose is to generate a brief report.

Thank you in advance.




More information about the Python-list mailing list