GNU bug report logs - #23095
24.5; python-shell-unbuffered causes problems on Windows

Previous Next

Package: emacs;

Reported by: Will Wykeham <will <at> wykeham.net>

Date: Tue, 22 Mar 2016 22:18:02 UTC

Severity: normal

Tags: fixed, patch

Merged with 21376

Found in versions 24.5, 25.0.50

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Will Wykeham <will <at> wykeham.net>
Cc: 23095 <at> debbugs.gnu.org
Subject: bug#23095: 24.5; python-shell-unbuffered causes problems on Windows
Date: Wed, 23 Mar 2016 17:46:28 +0200
> Date: Tue, 22 Mar 2016 15:01:27 +0000
> From: Will Wykeham <will <at> wykeham.net>
> 
> (let ((process-environment (python-shell-calculate-process-environment))
>        (code (concat "import sys\n"
>                     "print(sys.ps1)")))
>   (with-temp-buffer
>     (let ((code-file (python-shell--save-temp-file code)))
>       (call-process "python" code-file '(t nil) nil "-i")
>       (delete-file code-file))
>     (buffer-string)))
> 
> In an 'out of the box' emacs, with 'python-shell-unbuffered' set to t as
> default, this evaluates to an empty string.
> 
> If python-shell-unbuffered is then set to nil, then the above evaluates to
> the expected ">>>\n".
> 
> I haven't got to the bottom of why unbuffered is causing this
> problem. My suspicion is that it relates to the fact that
> PYTHONUNBUFFERED on Windows also causes python to process stdin/stdout
> as binary (which also affects line ending processing).

On Windows, Emacs communicates with subprocesses via pipes, which are
buffered.




This bug report was last modified 7 years and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.