Re: search a string

2006-04-20 Thread Carl J. Van Arsdall
Bruno Desthuilliers wrote: > Carl J. Van Arsdall a écrit : > (snip) > > >> With a file object, to iterate through the lines in a file don't you >> have to use readlines()? >> > > Nope - no more, should I say. The file object is now an iterable. > file.readlines() try and read all the file

Re: search a string

2006-04-20 Thread Bruno Desthuilliers
Carl J. Van Arsdall a écrit : (snip) > With a file object, to iterate through the lines in a file don't you > have to use readlines()? Nope - no more, should I say. The file object is now an iterable. file.readlines() try and read all the file and returns it as a list. It's ok for small files,

Re: search a string

2006-04-20 Thread Carl J. Van Arsdall
Bruno Desthuilliers wrote: > Carl J. Van Arsdall a écrit : > >> david brochu jr wrote: >> >> >>> Hello, >>> >>> >>> I have a text file with the following string: >>> ['\r\n', 'Pinging www.ebayyy.com >>> [207.189.104.86 ] with 32 bytes of

Re: search a string

2006-04-20 Thread Bruno Desthuilliers
Carl J. Van Arsdall a écrit : > david brochu jr wrote: > >> Hello, >> >> >> I have a text file with the following string: >> ['\r\n', 'Pinging www.ebayyy.com >> [207.189.104.86 ] with 32 bytes of data:\r\n', >> '\r\n', 'Request timed out.\r\n',

Re: search a string

2006-04-20 Thread Carl J. Van Arsdall
david brochu jr wrote: > Hello, > > > I have a text file with the following string: > ['\r\n', 'Pinging www.ebayyy.com > [207.189.104.86 ] with 32 bytes of data:\r\n', > '\r\n', 'Request timed out.\r\n', '\r\n', 'Ping statistics for > 207.189.1

search a string

2006-04-20 Thread david brochu jr
Hello,     I have a text file with the following string: ['\r\n', 'Pinging www.ebayyy.com [207.189.104.86] with 32 bytes of data:\r\n', '\r\n', 'Request timed out.\r\n', '\r\n', 'Ping statistics for 207.189.104.86:\r\n', '    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),\r\n']     How wou