read the orginal poster's SPECIFIC question he make only reference to a FILE or STDIN which can't be destructively read, either way he don't not requre the look-ahead to do what he wants. So my advice is still valid. Think about it in a different way.
-- http://mail.python.org/mailman/listinfo/python-list