unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Will Wykeham <will@wykeham.net>
Cc: 23095@debbugs.gnu.org
Subject: bug#23095: 24.5; python-shell-unbuffered causes problems on Windows
Date: Wed, 23 Mar 2016 17:46:28 +0200	[thread overview]
Message-ID: <83oaa52o4r.fsf@gnu.org> (raw)
In-Reply-To: <CAJEx1Ontvxot_FLPD_FZJhgPrW6UeFfowH+kBYUctTLObP=Z+g@mail.gmail.com> (message from Will Wykeham on Tue, 22 Mar 2016 15:01:27 +0000)

> Date: Tue, 22 Mar 2016 15:01:27 +0000
> From: Will Wykeham <will@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.





  reply	other threads:[~2016-03-23 15:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 15:01 bug#23095: 24.5; python-shell-unbuffered causes problems on Windows Will Wykeham
2016-03-23 15:46 ` Eli Zaretskii [this message]
2016-03-23 16:05   ` Will Wykeham
2017-12-03  5:43     ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83oaa52o4r.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23095@debbugs.gnu.org \
    --cc=will@wykeham.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).