Re: find string in file

2008-03-16 Thread Lie
On Mar 14, 8:25 pm, [EMAIL PROTECTED] wrote: > Hi friends !! > > I'm neophite about python, my target is to create a programa that > find  a specific string in text file. > How can do it? > > Thanks > fel I'd recommend regular expression (import re) if the string you're searching is in a complex f

Re: find string in file

2008-03-14 Thread eMko
An of course, you can use a regular expression. (Module "re"). -- http://mail.python.org/mailman/listinfo/python-list

Re: find string in file

2008-03-14 Thread Roman Dodin
On 14 mar, 14:25, [EMAIL PROTECTED] wrote: >> Hi friends !! >> >> I'm neophite about python, my target is to create a programa that >> find a specific string in text file. >> How can do it? >> >> Thanks >> fel >> > > > One more way to do this f = codecs.open("log.txt", 'r', "utf_16_le")

Re: find string in file

2008-03-14 Thread Michael Wieher
2008/3/14, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > Hi friends !! > > I'm neophite about python, my target is to create a programa that > find a specific string in text file. > How can do it? > > Thanks > fel > > -- > http://mail.python.org/mailman/listinfo/python-list > If your only goal is to

Re: find string in file

2008-03-14 Thread Tim Chase
> I'm neophite about python, my target is to create a programa that > find a specific string in text file. > How can do it? >>> FNAME1 = 'has.txt' >>> FNAME2 = 'doesnt_have.txt' >>> TEXT = 'thing to search for' >>> TEXT in file(FNAME1).read() True >>> TEXT in file(FNAME2).read() False or th

Re: find string in file

2008-03-14 Thread kaerbuhez
On 14 mar, 14:25, [EMAIL PROTECTED] wrote: > Hi friends !! > > I'm neophite about python, my target is to create a programa that > find a specific string in text file. > How can do it? > > Thanks > fel $ cat text.txt aaa bbb ccc ddd aaa bbb ccc ddd aaa bbb ccc ddd aaa eee bbb eee ccc eee ddd eee

find string in file

2008-03-14 Thread fminervino
Hi friends !! I'm neophite about python, my target is to create a programa that find a specific string in text file. How can do it? Thanks fel -- http://mail.python.org/mailman/listinfo/python-list