On May 8, 5:08 am, Li Wang <li.wan...@gmail.com> wrote: > Hi Dave: > Thank you very much for you explanation:) > > > Chances are you forgot the "b" parameter to open(). Unnecessary in Unix, it > > tells the library to *not* translate \r\n to \n upon read, or the inverse > > on write. In other words, with the "b" parameter, the file is read in > > unchanged. > > So, if I am using python in Linux, do open('file', 'r') and > open('file', 'rb') work the same way? > > Thanks, > > Best regards, > Li
In old Python up to 2.6, YES. -- http://mail.python.org/mailman/listinfo/python-list