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


Message #11 received at 23095 <at> debbugs.gnu.org (full text, mbox):

From: Will Wykeham <will <at> wykeham.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 23095 <at> debbugs.gnu.org
Subject: Re: bug#23095: 24.5;
 python-shell-unbuffered causes problems on Windows
Date: Wed, 23 Mar 2016 16:05:38 +0000
On 23 March 2016 at 15:46, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> 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.

Ah. In which case, it sounds like the appropriate thing would be to
set the default value of 'python-shell-unbuffered' to nil on Windows.

Will




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.