My report was for ipython. I've attached a screenshot showing the problem. The way I'm fixing this issue at the moment is by patching python-shell-font-lock-comint-output-filter-function like this: (defun python-shell-font-lock-comint-output-filter-function (output) "Clean up the font-lock buffer after any OUTPUT." (if (and (python-shell-comint-end-of-output-p (ansi-color-filter-apply output)) (not (string-match "\\.\\.\\.: $" output))) ;; If output is other than an input prompt then "real" output has ;; been received and the font-lock buffer must be cleaned up. (python-shell-font-lock-cleanup-buffer) ;; Otherwise just add a newline. (python-shell-font-lock-with-font-lock-buffer (goto-char (point-max)) (newline))) output)