I had a method that detects line endings In order to be able to test it without using real files, I changed it to: And this works fine with files. But when I do this: I get None The reason I’m checking the file ending is that I’m writing a program that process a text file, and I want to