Re: [Tutor] Writing a list in a text file

2006-12-03 Thread Alan Gauld
"Mihai Iacob" <[EMAIL PROTECTED]> wrote in > > def saveBugs(data): >store = open(filename, 'w') >for timeMark,aList in data.items(): >store.write(timeMark + '\n') >store.write(aList + '\n') >store.close() > > After i run this part the following error pops up: > > Tr

Re: [Tutor] Writing a list in a text file

2006-12-03 Thread Glenn T Norton
Mihai Iacob wrote: >Hello > > >def saveBugs(data): >store = open(filename, 'w') >for timeMark,aList in data.items(): >store.write(timeMark + '\n') >store.write(aList + '\n') >store.close() > >data is a dictionary >aList is a list > >After i run this part the following e

[Tutor] Writing a list in a text file

2006-12-03 Thread Mihai Iacob
Hello def saveBugs(data): store = open(filename, 'w') for timeMark,aList in data.items(): store.write(timeMark + '\n') store.write(aList + '\n') store.close() data is a dictionary aList is a list After i run this part the following error pops up: Traceback (most rec