From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71440: Python Inferior Mode =?UTF-8?Q?Can=E2=80=99t?= Recognize My Prompt Date: Sat, 08 Jun 2024 19:53:36 +0300 Message-ID: <86sexnbckv.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28350"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71440@debbugs.gnu.org To: "shynur ." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 08 18:55:01 2024 Return-path: Envelope-to: geb-bug-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 1sFzLI-00077B-Gb for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jun 2024 18:55:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFzL5-0001Fk-DL; Sat, 08 Jun 2024 12:54:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFzL4-0001FT-IJ for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 12:54:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFzL4-0005zH-B0 for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 12:54:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFzLK-0003Fg-59 for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 12:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jun 2024 16:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71440 X-GNU-PR-Package: emacs Original-Received: via spool by 71440-submit@debbugs.gnu.org id=B71440.171786564212423 (code B ref 71440); Sat, 08 Jun 2024 16:55:02 +0000 Original-Received: (at 71440) by debbugs.gnu.org; 8 Jun 2024 16:54:02 +0000 Original-Received: from localhost ([127.0.0.1]:39334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFzKM-0003EJ-6j for submit@debbugs.gnu.org; Sat, 08 Jun 2024 12:54:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFzKJ-0003Dm-PH for 71440@debbugs.gnu.org; Sat, 08 Jun 2024 12:54:00 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFzJx-0005va-OE; Sat, 08 Jun 2024 12:53:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=K/MAQIkEnAl4PwBdhKILrRTv8SHskFdwXESPCg9YV2I=; b=RlTrpoef5ZBuRV0nABMi 6ABUVjwLsN66SSvttlen6pk3blS4ozCfYbGTq9bjQFPjlDg3Wbu7GOVZqhwKd8q4n39w11E3WyEX9 rCdtZr5hLHf0s5qVi/hMZ52Fby5pTfAmbPhfSMtkajCuJiTakPmPAhm2oRwJIBH3Z2V23/2a6iAIY 8GI676lq4HWfJ7DMxkq4lMXtvzDscyuv5mk7rYDcbSs7XGrPRTZm+AigiRNDncY0SUqPJiyHxugvm Olvbau/XdymBagut48XpEvoV/EnV5EJG2FsaQhd8SnmNgvVWUAcEit749f6/RP5h01koamdNdDLkR r87EWQPNcBi/Pw==; In-Reply-To: (one.last.kiss@outlook.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286877 Archived-At: > From: "shynur ." > Date: Sat, 8 Jun 2024 16:29:40 +0000 > msip_labels: > > I set the ‘PYTHONSTARTUP’ environment variable to a file > whose content is > > ```python > import sys > sys.ps1, sys.ps2 = "\033[32m►\033[0m", "\033[32m▻\033[0m" > ``` > > It works well if I start Python3 in my terminal (Windows > Terminal, windows11’s built-in app). > > However, if I use it in Emacs: > > 1. open a Python file in Emacs > 2. type ‘C-c C-p’ (run-python) > 3. in the buffer visiting the Python file, type ‘C-c C-c’ > (python-shell-send-buffer) > > Python will throw an error: > > ``` > Traceback (most recent call last): > File "", line 1, in > NameError: name '__PYTHON_EL_eval' is not defined I'm guessing that this is because that #x25ba and #x25bb Unicode characters don't survive your system codepage (which Emacs uses to communicate with inferior Python). What are the values of w32-ansi-code-page and w32-multibyte-code-page on your system?