On Tue, Mar 10, 2015, at 00:01, Paulo da Silva wrote: > For .pnm photo files I read the entire file (I needed it in memory > anyway), splited a copy separated by b'\n', got the headers stuff and > then used the original remaining bytes as the photo pixels. > But this is very tricky! I am on linux, but if I ran this program on > windows I needed to change it to "eat" also the '\r'.
Why? The file is the same file. If the .pnm format is allowed to have a '\r' there, you're just as likely to have to deal with it in Linux. -- https://mail.python.org/mailman/listinfo/python-list