[Tutor] Bug in my program

Kyle Babich kyle@sent.com
Tue Oct 29 09:18:03 2002


Could someone please help me fix this?  I didn't include the full program
because it is too large but I have several blocks like this:

            try:
                ReadNum = file('C:/Documents and Settings/All
Users/Documents/TimeTrack/logs/beg_log.dat', 'r')
                content = ReadNum.xreadlines()
                last = string.split(content[len(content) - 1], ':')
                num = last[0]
                ReadNum.close()
            except:
                num = 'error reading num'

            BegTime = time.strftime('%I:%M:%S%p %Z',
time.localtime(time.time()))
            BegLog = file('C:/Documents and Settings/All
Users/Documents/TimeTrack/logs/beg_log.dat', 'a')
            BegLog.write(num + ':  ' + name + ' requested to sleep for one
hour starting at ' + BegTime + '\n')
            BegLog.close()

that keep giving me this:

Traceback (most recent call last):
  File "C:\Documents and Settings\Kyle\My
Documents\Programs\TimeTrack\TimeTrackOne.py", line 96, in ?
    BegLog = file('C:/Documents and Settings/All
Users/Documents/TimeTrack/logs/beg_log.dat', 'a')
TypeError: 'list' object is not callable

I have 2.2.1 installed on XP Home.
Any help is greatly appreciated, thank you!

- Kyle