For some reason this code acts like the edit mode isn't append:
def log_time(name, time):
get_log(date.today())
f = open(logFile, 'a')
f.write(name + ' | ' + time + '\n')
f.close()
Is there anything wrong with it just by looking at this function? I am reasonably sure that the other functions work fine. The problem is that when I call this function twice, only one thing shows up in the file.
I figured out what was wrong, but I don't know why it was wrong. When I created the file I used 'w+' mode and when I changed it to 'a' it worked. Can someone tell me why?