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 find a string in a file, just use grep
>grep -i 'string' filename

its a standard linux command =)

But if you must use python

data=file(filename,'r').read()
if string in data:
   return True
return False
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to