[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I get a Python REPL in Eshell on M$ Windows?

From: Eduardo Ochs
Subject: How do I get a Python REPL in Eshell on M$ Windows?
Date: Sat, 4 Jun 2022 20:08:17 -0300

Hi list,

I have many students who sort of "want to learn GNU/Linux when they
grow up", but usually they take years between the "want to" stage and
the stage in which they have some kind of GNU/Linux installed in their
machines - either in a VM or in a partition - and several more years
between that stage and the stage in which they become minimally
proficient with a shell...

I'm trying to change that. The details are not important to my
question, but here is a link to them, for the sake of completeness:

Anyway, here is my question.

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, PUC-Rio
  > print(2+3)
  > os.exit()
  ~ $
  ~ $ py

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

  PS C:\Users\ferob> py
  Python 3.10.4 [etc etc etc]
  >>> print(2+3)

Thanks in advance!

  Eduardo Ochs

reply via email to

[Prev in Thread] Current Thread [Next in Thread]