Re: problem when reading file

2008-07-31 Thread Bruce Frederiksen
On Thu, 31 Jul 2008 23:44:33 +1000, shrimpy wrote: > hi every one, i am new to python, > and coz i want to write a handy command for my linux machine, to find > a word in all the files which are under the current folder. > > the code is half done, but when i run it, it complain, and i don`t know

Re: problem when reading file

2008-07-31 Thread Heiko Wundram
Am Donnerstag, 31. Juli 2008 15:44:33 schrieb shrimpy: > hi every one, i am new to python, > and coz i want to write a handy command for my linux machine, to find > a word in all the files which are under the current folder. What about grep -R "myword" . ? Even works on regular expression (with

problem when reading file

2008-07-31 Thread shrimpy
hi every one, i am new to python, and coz i want to write a handy command for my linux machine, to find a word in all the files which are under the current folder. the code is half done, but when i run it, it complain, and i don`t know why??? can anyone help me have a look at it? here is the me