Or you could implement it yourself quite easily, because all you need is readlines() :
def FileSpoof: def __init__(self,my_text): self.my_text = my_text def readlines(self): return self.my_text.splitlines()
then just name it like this:
somefake = FileSpoof("This is a bunch\nOf Text!") print somefake.readlines()
However, another answer is probably more correct.
source share