Well, now I tried running the script and it worked fine with the .gfx file. Originally I was working using the IDLE, which I wouldn't have thought would make a difference, but when I ran the script on its own it worked fine and when I ran it in the IDLE it didn't work unless the data was in a text file. Weird.
-- http://mail.python.org/mailman/listinfo/python-list