Perl Hacker, Python Initiate

Carl Banks pavlovevidence at
Wed Feb 2 08:52:02 CET 2011

On Feb 1, 8:36 pm, Gary Chambers <gwch... at> wrote:

> open DIG, "$DIGCMD|" or die "$DIG: $!\n";
> while (<DIG>) {

> Will someone please provide some insight on how to accomplish that task in
> Python?  I am unable to continually (i.e. it stops after displaying a single
> line) loop through the output while testing for the matches on the two
> regular expressions.  Thank you.

You may have called read() instead of readlines().

Carl Banks

More information about the Python-list mailing list