On Apr 4, 10:22 pm, mik3l3... at gmail.com wrote: > how did you generate aaa.txt? Ok, I got it to work by supplying a filename that didn't previously exist. Neither the book I am reading, "Beginning Python: From Novice to Professional" nor the book I am using as a reference, "Python in Nutshell", happens to mention that important fact.