GNU bug report logs - #71440
Python Inferior Mode Can’t Recognize My Prompt

Previous Next

Package: emacs;

Reported by: "shynur ." <one.last.kiss <at> outlook.com>

Date: Sat, 8 Jun 2024 16:36:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#71440: closed (Python Inferior Mode Can’t
 Recognize My Prompt)
Date: Sat, 15 Jun 2024 11:01:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 15 Jun 2024 13:45:20 +0300
with message-id <867ceqv60v.fsf <at> gnu.org>
and subject line Re: bug#71440: Python Inferior Mode Can’t Recognize My Prompt
has caused the debbugs.gnu.org bug report #71440,
regarding Python Inferior Mode Can’t Recognize My Prompt
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
71440: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71440
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "shynur ." <one.last.kiss <at> outlook.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: Python Inferior Mode Can’t Recognize My Prompt
Date: Sat, 8 Jun 2024 16:29:40 +0000
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 "<stdin>", line 1, in <module>
NameError: name '__PYTHON_EL_eval' is not defined
```
[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: kobarity <kobarity <at> gmail.com>
Cc: one.last.kiss <at> outlook.com, 71440-done <at> debbugs.gnu.org
Subject: Re: bug#71440: Python Inferior Mode Can’t
 Recognize My Prompt
Date: Sat, 15 Jun 2024 13:45:20 +0300
> Date: Thu, 13 Jun 2024 23:24:15 +0900
> From: kobarity <kobarity <at> gmail.com>
> Cc: "71440 <at> debbugs.gnu.org" <71440 <at> debbugs.gnu.org>
> 
> shynur . wrote:
> > 
> > kobarity:
> > > Could you please try the improved patch I've attached,
> > > which I believe will eliminate this warning as well?
> > 
> > Thanks.  No error or warning now.
> 
> Thanks for confirming.  Unless I get feedback from others, this is the
> final version from me.

Now installed on master, and closing the bug.

Thanks.


This bug report was last modified 1 year and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.