Got a simple script which worked perfectly under Python 2.7.1 at my Win xp machine. Now got a win 7 machine with python 3.1.3.
The code is:
owriter.w
Probably you need to open the file in text mode. If not, include enough of your code so it's runnable and demonstrates the problem.