Python stringio to file. isatty() – Indicates whether a file object is interactive.