On Sat, May 19, 2018 at 7:53 AM, bartc <b...@freeuk.com> wrote: > I've worked with text files for 40 years. Now Python is telling me I've been > doing it wrong all that time! > > Look at the original code I posted from which this Python was based. That > creates a file - just a file - without worrying about whether it's text or > binary. Files are just collections of bytes, as far as the OS is concerned. > > So what could be more natural than writing a byte to the end of a file?
So, you create a file without worrying about whether it's text or binary, and you add a byte to the end of the file. That means you're treating it as a binary file, not as a text file. Do you understand that? ChrisA -- https://mail.python.org/mailman/listinfo/python-list