Hi Guys, Thanks for all the suggestions. I found the problem. I had saved my program in IDLE and quit out of the shell, and then tried to run the program in Terminal. Previously, restarting the shell was enough to break the connection with the port. This time, I guess, it wasn't. So after thinking about your suggestions, I bypassed IDLE and went directly to Terminal, and the program worked.
Tamara -- https://mail.python.org/mailman/listinfo/python-list