all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#44732: 27.1; Inferior Python mode does not correctly display output of ipython3
@ 2020-11-19  1:04 Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-11-24  7:55 ` Lars Ingebrigtsen
  2021-08-25 18:30 ` Augusto Stoffel
  0 siblings, 2 replies; 6+ messages in thread
From: Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-11-19  1:04 UTC (permalink / raw)
  To: 44732

- emacs -q
- (setq python-shell-interpreter "ipython3")
- M-x run-python
- Enter 1 + 2 into the IPython prompt.

After hitting Enter, the '2' displays twice:

Python 3.8.6 (default, Sep 23 2020, 13:54:27) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.17.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: 1 + 2
1 + 22
Out[1]: 3

In [2]:


-- 
Sent with https://mailfence.com
Secure and private email





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#44732: 27.1; Inferior Python mode does not correctly display output of ipython3
  2020-11-19  1:04 bug#44732: 27.1; Inferior Python mode does not correctly display output of ipython3 Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-11-24  7:55 ` Lars Ingebrigtsen
  2021-08-25 18:30 ` Augusto Stoffel
  1 sibling, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-24  7:55 UTC (permalink / raw)
  To: Brian Leung; +Cc: 44732

Brian Leung <leungbk@mailfence.com> writes:

> In [1]: 1 + 2
> 1 + 22
> Out[1]: 3
>
> In [2]:

Not only that, it grows progressively weirder:

In [1]: 1 + 2
1 + 22
Out[1]: 3

In [2]: 1 + 3
11  ++  3333
Out[2]: 4

In [3]: 4 + 5
444   +++   555555
Out[3]: 9

In [4]: 1 + 2
1111    ++++    22222222
Out[4]: 3

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#44732: 27.1; Inferior Python mode does not correctly display output of ipython3
  2020-11-19  1:04 bug#44732: 27.1; Inferior Python mode does not correctly display output of ipython3 Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-11-24  7:55 ` Lars Ingebrigtsen
@ 2021-08-25 18:30 ` Augusto Stoffel
  2021-08-26 14:21   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 6+ messages in thread
From: Augusto Stoffel @ 2021-08-25 18:30 UTC (permalink / raw)
  To: 44732

This is solved by adding the following extra argument to ipython:

(setq python-shell-interpreter "ipython3"
      python-shell-interpreter-args "--simple-prompt")





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#44732: 27.1; Inferior Python mode does not correctly display output of ipython3
  2021-08-25 18:30 ` Augusto Stoffel
@ 2021-08-26 14:21   ` Lars Ingebrigtsen
  2021-08-26 15:02     ` Augusto Stoffel
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-26 14:21 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: 44732

Augusto Stoffel <arstoffel@gmail.com> writes:

> This is solved by adding the following extra argument to ipython:
>
> (setq python-shell-interpreter "ipython3"
>       python-shell-interpreter-args "--simple-prompt")

Should the defaults in python.el be changed?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#44732: 27.1; Inferior Python mode does not correctly display output of ipython3
  2021-08-26 14:21   ` Lars Ingebrigtsen
@ 2021-08-26 15:02     ` Augusto Stoffel
  2021-08-27  2:51       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Augusto Stoffel @ 2021-08-26 15:02 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 44732

On Thu, 26 Aug 2021 at 16:21, Lars Ingebrigtsen <larsi@gnus.org> wrote:

> Augusto Stoffel <arstoffel@gmail.com> writes:
>
>> This is solved by adding the following extra argument to ipython:
>>
>> (setq python-shell-interpreter "ipython3"
>>       python-shell-interpreter-args "--simple-prompt")
>
> Should the defaults in python.el be changed?

No, the defaults are good.  But there's a pitfall: if you change the
interpreter from "python" to the fancier "ipython", you need to add the
extra "--simple-prompt" argument.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#44732: 27.1; Inferior Python mode does not correctly display output of ipython3
  2021-08-26 15:02     ` Augusto Stoffel
@ 2021-08-27  2:51       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-27  2:51 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: 44732

Augusto Stoffel <arstoffel@gmail.com> writes:

> No, the defaults are good.  But there's a pitfall: if you change the
> interpreter from "python" to the fancier "ipython", you need to add the
> extra "--simple-prompt" argument.

Ah, I see.  I've now amended the doc string of
`python-shell-interpreter' to mention this.  And I think that should be
sufficient here, and I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-27  2:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-19  1:04 bug#44732: 27.1; Inferior Python mode does not correctly display output of ipython3 Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-24  7:55 ` Lars Ingebrigtsen
2021-08-25 18:30 ` Augusto Stoffel
2021-08-26 14:21   ` Lars Ingebrigtsen
2021-08-26 15:02     ` Augusto Stoffel
2021-08-27  2:51       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.