fixing read_line to be valid rpython