From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: How do I get a Python REPL in Eshell on M$ Windows? Date: Sat, 4 Jun 2022 20:08:17 -0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10478"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 05 01:10:03 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nxcuA-0002V0-R3 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 05 Jun 2022 01:10:02 +0200 Original-Received: from localhost ([::1]:54840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nxcu7-0007aa-VH for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 04 Jun 2022 19:09:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxcsj-0007aR-DW for help-gnu-emacs@gnu.org; Sat, 04 Jun 2022 19:08:33 -0400 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:39807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nxcsh-0004jm-LZ for help-gnu-emacs@gnu.org; Sat, 04 Jun 2022 19:08:33 -0400 Original-Received: by mail-lf1-x12f.google.com with SMTP id y32so17970431lfa.6 for ; Sat, 04 Jun 2022 16:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=Edr7AgfEbSJddR+oDUyp1GNI6LFfpFw//+SeOZsMfak=; b=nPYPIbCD1pFhgw+etFcyduiTcrhO5qVZDY+mIVaojil9KiIgMsEtuqHFs8qp/gQNX3 IGLbB4QgK7C6dYKWT3yZMILPYYJOu07XuzJk5NfSO+dFm3Bvws4Nw56rxWF0eJKqtFkC M9s4iUwqF4Cz254s0cgNaehK/LwbvltC7PjFkwfMX4YG5k4nn+uuWhV+DH0p2Xm8svJb xvU9jlnZ/u1607tW9gTmZcJDqsrbWk73m7zv+yGRON6jSxJcy5lEaYHPgFbCEW0Hew9A ACseGDXu57YgSsArseWesfSDmeVhv7Nq72YvRuNNumb7dFvNRnnWzGYaIxMLvmjhsXqt p91Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Edr7AgfEbSJddR+oDUyp1GNI6LFfpFw//+SeOZsMfak=; b=8Fek6t9lUHwDnHMQD0M+1HN9FdRnT7/gtJnH4N/vgy1ZN38AJ85ROsKJox0PuRscNS OS95wDPHQX1TRsFIrMC5ZJWB8q+Pi6y8qCfDo49tzsPq3BSaS2u2AgL9BvwbRSwBOS8f NFT4AioSOA6gLU6zTkiHX+uzVqggGe8oL6zamcGw3dUEb+lwj37g1bsWCvT8qQCo+yS0 3TouYKQ/oY4EBjAWnDPbmiB0D0yNBHOHyA45nE358jJS5Rt2d5n2EgvRjYJ1ImKhRPW0 bOT25xDxcTVs6wjrE/U1Dd0JoxqQrptH2UbDOrEbkbKBO3+T0U7yw772CheBCaGwBmGC Vejw== X-Gm-Message-State: AOAM531F9IHx0GcpJP0fACsy8DlavjtKjk3XjH0qOin1WvXOqVs/0q9y 4k6gJqQuHIjjoijaj0JN884mLSQYj2sQj7TxYmJQ2BsFhLU= X-Google-Smtp-Source: ABdhPJwFsruDxQTDrNubSd72LvJeGkuhqRUrTFATRRaqGhW+ksQvlpp4NlZvyZO0tqPtgNAj7802E/0+bnN9zbQyTJM= X-Received: by 2002:ac2:508e:0:b0:479:445:ee05 with SMTP id f14-20020ac2508e000000b004790445ee05mr11276204lfm.163.1654384108496; Sat, 04 Jun 2022 16:08:28 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=eduardoochs@gmail.com; helo=mail-lf1-x12f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137496 Archived-At: 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: http://angg.twu.net/eev-wconfig.html 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 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 >>> Thanks in advance! Eduardo Ochs http://angg.twu.net/#eev