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

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

2006-02-17 Thread Chris Hallman
Here is my script:send_file.pyimport os, random, re, string, sys, telnetlib, threading, timefrom time import strftimefrom threading import Threadclass ConfigIT(threading.Thread):     def __init__(self,host):        Thread.__init__(self)        self.host = host        self.filename = filename    def