Re: search files in a directory

2006-04-21 Thread bruno at modulix
Gary Herron wrote: > david brochu jr wrote: > >> Hello, >> >> I need to open every file in a directory and search for a string. What >> module is needed to do this and how would I go about searching each file? [bash] find /path/to/dir -exec grep -le "searched string" {} \; Ho, you meant : doin

Re: search files in a directory

2006-04-20 Thread Gary Herron
david brochu jr wrote: > Hello, > > I need to open every file in a directory and search for a string. What > module is needed to do this and how would I go about searching each file? os.listdir(dir) gives a list of all the file in a directory. You can then loop through the list. open can b

search files in a directory

2006-04-20 Thread david brochu jr
Hello,   I need to open every file in a directory and search for a string. What module is needed to do this and how would I go about searching each file? -- http://mail.python.org/mailman/listinfo/python-list