in python ignore <CR> when cursor position is almost definite end of statement