I have the solution, the flaw was not in the opening of the file, but in the writing of the file. Stupid me, i opened it with mode rb, but wrote it with w instead of with wb
Everybody thanks for helping me. -- http://mail.python.org/mailman/listinfo/python-list