How can I see if a file-like object is in universal newline mode or not (or any details related to that)?
Both Python 2 and/or 3 answers are okay.
Hint: No, the newlines attribute does not reflect this. It is always there when the Python interpreter has universal newlines support.
The mode attribute is left intact when opening files. I expect you could check if newlines exists and mode contains 'U'. Other translations are indicated by encoding.
How to see whether a file was opened in universal newlines mode? (Or whatever newline translations it is doing?)