Subject: bug#17304: Python mode delays evaluation

From: Márton Marczell <[email-masked]>
Date: Sat, 3 May 2014 19:11:27 +0200

Yes, if I run "python 2>&1 | cat.exe" in the cmd.exe prompt, I get the
exact same behaviour. But I don't have the same problem with Python 2.

On Sat, May 3, 2014 at 8:20 AM, Eli Zaretskii <[email-masked]> wrote:

> > From: Glenn Morris <[email-masked]>
> > Date: Fri, 02 May 2014 21:16:35 -0400
> > Cc: [email-masked]
> >
> > Márton Marczell wrote:
> >
> > > When I run a Python 3.3.4 prompt inside Emacs 24.3 on Windows 7,
> correct
> > > commands are evaluated immediately, but incorrect ones are delayed (I
> have
> > > to press Enter one more time), as seen below:
> > >
> > >     >>> 1
> > >     1
> > >     >>> nonsense
> > >     >>>
> > >     Traceback (most recent call last):
> > >     File "<stdin>", line 1, in <module>
> > >     NameError: name 'nonsense' is not defined
> > [...]
> > > In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)
> >
> > FWIW, I cannot reproduce this with Emacs 24.3 and Python 3.4.0 on
> GNU/Linux.
>
> Probably because of buffering differences: pipes are fully buffered on
> Windows, even those used for stderr.  If that is indeed the case, I
> don't think this problem can be fixed in Emacs.
>
> To the OP: do you have the same problem if you redirect Python's
> output streams in the shell, using "2>&1 |" ?  The other side of the
> pipe could be cat.exe, for example.
>