In python, is there a built-in way to do a readline() on string? I have a large chunk of data and want to strip off just the first couple lines w/o doing split() on the who
Do it like StringIO does it:
i = self.buf.find('\n', self.pos)
So this means:
pos = msg.find("\n") first_line = msg[:pos] ...
Seems more elegant than using the whole StringIO...