I know that I should open a binary file using \"rb\" instead of \"r\" because Windows behaves differently for binary and non-binary files.
\"rb\"
\"r\"
For reading files there should be no difference. When writing to text-files Windows will automatically mess up your line-breaks (it will add \r's before the \n's). That's why you should use "wb".
\r
\n
"wb"