Re: [Tutor] TypeError: 'str' object is not callable

2006-02-17 Thread Chris Hallman
Oh, gee. Do I feel sheepish. I knew I had been staring at the error all along, but yet couldn't see it.Thanks!!On 2/17/06, Kent Johnson <[EMAIL PROTECTED]> wrote:Chris Hallman wrote: >> Here is my script:> input = file(rpath, "r")> for line in file(rpath):> for file in dirList:>   

Re: [Tutor] TypeError: 'str' object is not callable

2006-02-17 Thread Kent Johnson
Chris Hallman wrote: > > Here is my script: > input = file(rpath, "r") > for line in file(rpath): > for file in dirList: > filename = file.lower() You use the name 'file' for a global variable. This hides the builtin function 'file'. This is a bit of a gotcha for newbies - t