Index: Parser/tokenizer.c =================================================================== --- Parser/tokenizer.c (revision 87786) +++ Parser/tokenizer.c (working copy) @@ -892,6 +892,13 @@ } if (tok->prompt != NULL) { char *newtok = PyOS_Readline(stdin, stdout, tok->prompt); + if (newtok != NULL) { + char *translated = translate_newlines(newtok, 0, tok); + if (translated == NULL) + return EOF; + PyMem_FREE(newtok); + newtok = translated; + } #ifndef PGEN if (tok->encoding && newtok && *newtok) { /* Recode to UTF-8 */