unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How do I get a Python REPL in Eshell on M$ Windows?
Date: Sun, 05 Jun 2022 08:14:51 +0300	[thread overview]
Message-ID: <831qw3bsj8.fsf@gnu.org> (raw)
In-Reply-To: <CADs++6ghe4DXtuzL2k0sQ07AGFgiT_rG5KFPzoE+HfhuYeebPw@mail.gmail.com> (message from Eduardo Ochs on Sat, 4 Jun 2022 20:08:17 -0300)

> From: Eduardo Ochs <eduardoochs@gmail.com>
> Date: Sat, 4 Jun 2022 20:08:17 -0300
> 
> When my students try to run Python in a buffer created with M-x shell
> or M-x eshell they don't get an interactive REPL - they get something
> that _looks like_ a REPL that is stuck because of bad terminal
> settings. In Lua we were able to fix that by running "lua52.exe -i"
> instead of just "lua52.exe"... anyone knows how to do something
> similar for Python?
> 
> Here is what one student got in his *eshell* buffer:
> 
>   Welcome to the Emacs shell
> 
>   ~ $ ~/eev-wconfig/lua52.exe -i
>   Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
>   > print(2+3)
>   5
>   > os.exit()
>   ~ $
>   ~ $ py
>   print(2+3)
>   print(2+3)
> 
> He sent me a photo of what he got when he ran "py" in a "normal"
> terminal running PowerShell. It was something like this:
> 
>   Windows PowerShell
>   Copyright (C) Microsoft Corporation. Todos os direitos reservados.
> 
>   Experimente a nova plataforma cruzada PowerShell https://aka.ms/pscore6
> 
>   PS C:\Users\ferob> py
>   Python 3.10.4 [etc etc etc]
>   >>> print(2+3)
>   5
>   >>>

I believe the buffering of Python interpreter's stdout can also be
controlled.  Search the Internet for "how to make python standard
output unbuffered", and you will find the answers.



  reply	other threads:[~2022-06-05  5:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-04 23:08 How do I get a Python REPL in Eshell on M$ Windows? Eduardo Ochs
2022-06-05  5:14 ` Eli Zaretskii [this message]
2022-06-05 16:59   ` Bruno Barbier

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=831qw3bsj8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).