unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
@ 2018-07-02 20:13 Jaan Altosaar
  2018-07-02 20:32 ` Noam Postavsky
  2018-07-07 14:43 ` Noam Postavsky
  0 siblings, 2 replies; 15+ messages in thread
From: Jaan Altosaar @ 2018-07-02 20:13 UTC (permalink / raw)
  To: 32042

[-- Attachment #1: Type: text/plain, Size: 5533 bytes --]

Here is how I'm starting emacs, with these contents of init.el:
```
(setq
 python-shell-interpreter "ipython"
 python-shell-interpreter-args "--simple-prompt --classic --nosep"
)
```
Then if I open a file `~/tmp/test.py` with the contents:

```
print('test printing')
print('test bug)
```

And run it using `M-x run-python` then `M-x python-shell-send-buffer`,
the output is quite messy:

```
Python 3.6.5 |Anaconda custom (64-bit)| (default, Apr 26 2018, 08:42:37)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.
>>> Traceback (most recent call last):

  File
"/usr/local/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py",
line 2963, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "<ipython-input-1-57ce0cd600e5>", line 1, in <module>
    import codecs, os;__pyfile =
codecs.open('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000gn/T/pyLbk6Vh''',
encoding='''utf-8''');__code =
__pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000gn/T/pyLbk6Vh''');exec(compile(__code,
'''/Users/jaan/tmp/test.py''', 'exec'));

  File "/Users/jaan/tmp/test.py", line 2
    print('test bug)
                    ^
SyntaxError: EOL while scanning string literal
```

Is there any way to clean up the output, especially the parts involving
`codecs.open('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000gn/T/pyLbk6Vh'''`?

Thanks so much! Emacs newbie here, may be missing something basic...


In GNU Emacs 26.1 (build 1, x86_64-apple-darwin17.5.0)
 of 2018-06-02 built on 172-16-42-187.DYNAPOOL.NYU.EDU
Recent messages:
Searching for ‘test.py’.... [2 times]
(New file)
Saving file /Users/jaan/tmp/test.py...
Wrote /Users/jaan/tmp/test.py
user-error: Start a Python process first with ‘M-x run-python’ or ‘C-c C-p’.
Shell native completion is disabled, using fallback
Sent: print('test printing')...
Mark set
Quit
user-error: Current buffer has no process
Quit
Configured using:
 'configure --disable-dependency-tracking --disable-silent-rules
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/26.1_1/share/info/emacs
 --prefix=/usr/local/Cellar/emacs/26.1_1 --with-gnutls --without-x
 --with-xml2 --without-dbus --with-imagemagick --with-rsvg --without-ns'

Configured features:
JPEG NOTIFY ACL GNUTLS LIBXML2 ZLIB THREADS LCMS2

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Inferior Python

Minor modes in effect:
  compilation-shell-minor-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  helm-mode: t
  async-bytecomp-package-mode: t
  xclip-mode: t
  ido-everywhere: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  global-visual-line-mode: 1
  visual-line-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils ffap compile python tramp-sh tramp tramp-compat
tramp-loaddefs trampver ucs-normalize shell pcomplete parse-time json
map comint regexp-opt ansi-color vc-git diff-mode image winner thingatpt
cl-extra help-mode helm-command helm-elisp helm-eval edebug helm-info
ring info tool-bar misearch multi-isearch term/xterm xterm time-date
elec-pair helm-mode helm-files helm-buffers helm-tags helm-locate
helm-grep helm-regexp format-spec helm-utils helm-help helm-types helm
easy-mmode helm-source eieio-compat helm-multi-match helm-lib
helm-config helm-easymenu async-bytecomp advice async xclip edmacro
kmacro solarized-theme solarized-definitions ido finder-inf package
easymenu epg-config url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt
gv bytecomp byte-compile cconv cl-loaddefs cl-lib mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese composite
charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev
obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face
macroexp files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote kqueue
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 405604 13728)
 (symbols 48 31824 1)
 (miscs 40 176 376)
 (strings 32 78802 1488)
 (string-bytes 1 2336041)
 (vectors 16 50728)
 (vector-slots 8 892846 8650)
 (floats 8 126 1059)
 (intervals 56 4765 66)
 (buffers 992 20))

[-- Attachment #2: Type: text/html, Size: 7285 bytes --]

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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
  2018-07-02 20:13 bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output Jaan Altosaar
@ 2018-07-02 20:32 ` Noam Postavsky
  2018-07-02 21:18   ` Jaan Altosaar
  2018-07-07 14:43 ` Noam Postavsky
  1 sibling, 1 reply; 15+ messages in thread
From: Noam Postavsky @ 2018-07-02 20:32 UTC (permalink / raw)
  To: Jaan Altosaar; +Cc: 32042

merge 32042 25753
quit

Jaan Altosaar <altosaar@princeton.edu> writes:

>   File "<ipython-input-1-57ce0cd600e5>", line 1, in <module>
>     import codecs, os;__pyfile =
> codecs.open('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000gn/T/pyLbk6Vh''',
> encoding='''utf-8''');__code =
> __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000gn/T/pyLbk6Vh''');exec(compile(__code,
> '''/Users/jaan/tmp/test.py''', 'exec'));

> Is there any way to clean up the output, especially the parts involving
> `codecs.open('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000gn/T/pyLbk6Vh'''`?

Try installing gnureadline, as described in etc/PROBLEMS:

    *** In Inferior Python mode, input is echoed and native completion doesn't work.
    <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753>

    This happens when python uses a libedit based readline module, which
    is the default on macOS.  This can be worked around by installing a
    GNU readline based module instead, for example, using setuptools

        sudo easy_install gnureadline

    And then rename the system's readline so that it won't be loaded:

        cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
        mv readline.so readline.so.bak

    See <https://pypi.python.org/pypi/gnureadline> for more details on
    installation.







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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
  2018-07-02 20:32 ` Noam Postavsky
@ 2018-07-02 21:18   ` Jaan Altosaar
  2018-07-03  0:45     ` Noam Postavsky
       [not found]     ` <mailman.2978.1530578768.1292.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 15+ messages in thread
From: Jaan Altosaar @ 2018-07-02 21:18 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 32042@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 1858 bytes --]

Thanks!

I installed gnureadline. I could not rename the readline.so file as the
file moved to the /System/Library path in Mac High Sierra.

FWIW I am not using the system python, but Anaconda 3 python (ipython
6.4.0).

Python 3.6.5 |Anaconda custom (64-bit)| (default, Apr 26 2018, 08:42:37).

Is there anything else I should try?

On Monday, July 2, 2018, Noam Postavsky <npostavs@gmail.com> wrote:

> merge 32042 25753
> quit
>
> Jaan Altosaar <altosaar@princeton.edu> writes:
>
> >   File "<ipython-input-1-57ce0cd600e5>", line 1, in <module>
> >     import codecs, os;__pyfile =
> > codecs.open('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000g
> n/T/pyLbk6Vh''',
> > encoding='''utf-8''');__code =
> > __pyfile.read().encode('''utf-8''');__pyfile.close();os.remo
> ve('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000gn/T/
> pyLbk6Vh''');exec(compile(__code,
> > '''/Users/jaan/tmp/test.py''', 'exec'));
>
> > Is there any way to clean up the output, especially the parts involving
> > `codecs.open('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000
> gn/T/pyLbk6Vh'''`?
>
> Try installing gnureadline, as described in etc/PROBLEMS:
>
>     *** In Inferior Python mode, input is echoed and native completion
> doesn't work.
>     <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753>
>
>     This happens when python uses a libedit based readline module, which
>     is the default on macOS.  This can be worked around by installing a
>     GNU readline based module instead, for example, using setuptools
>
>         sudo easy_install gnureadline
>
>     And then rename the system's readline so that it won't be loaded:
>
>         cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python
> 2.7/lib-dynload
>         mv readline.so readline.so.bak
>
>     See <https://pypi.python.org/pypi/gnureadline> for more details on
>     installation.
>
>
>

[-- Attachment #2: Type: text/html, Size: 2786 bytes --]

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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
  2018-07-02 21:18   ` Jaan Altosaar
@ 2018-07-03  0:45     ` Noam Postavsky
  2018-07-09 12:59       ` Jaan Altosaar
       [not found]     ` <mailman.2978.1530578768.1292.bug-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 15+ messages in thread
From: Noam Postavsky @ 2018-07-03  0:45 UTC (permalink / raw)
  To: Jaan Altosaar; +Cc: 32042@debbugs.gnu.org

Jaan Altosaar <altosaar@princeton.edu> writes:

> Thanks!
>
> I installed gnureadline. I could not rename the readline.so file as the
> file moved to the /System/Library path in Mac High Sierra.
>
> FWIW I am not using the system python, but Anaconda 3 python (ipython
> 6.4.0).
>
> Python 3.6.5 |Anaconda custom (64-bit)| (default, Apr 26 2018, 08:42:37).
>
> Is there anything else I should try?

You mean there was no change?  Perhaps instead of the /System/Library
path you need to find where the libedit readline is installed for
Anaconda.  Although I'm not sure where that would be.






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

* Re: bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
       [not found]     ` <mailman.2978.1530578768.1292.bug-gnu-emacs@gnu.org>
@ 2018-07-06 19:21       ` jaan.altosaar
  0 siblings, 0 replies; 15+ messages in thread
From: jaan.altosaar @ 2018-07-06 19:21 UTC (permalink / raw)
  To: bug-gnu-emacs

There was no change; I still see the broken output in the original post...

```File "<ipython-input-1-57ce0cd600e5>", line 1, in <module>
    import codecs, os;__pyfile = codecs.open('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000gn/T/pyLbk6Vh''', encoding='''utf-8''')
```

I tried:

Disabling system integrity protection (booting into OS X High Sierra recovery mode and running `csrutil disable`), then 

```
cd /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload 
sudo mv readline.so readline.so.bak
```

and the same for the anaconda readline:

```
cd /usr/local/anaconda3/lib/python3.6/lib-dynload
mv readline.cpython-36m-darwin.so readline.cpython-36m-darwin.so.bak
```

And installing gnureadline.

Still getting the same broken output.

Any other ideas?

On Monday, July 2, 2018 at 8:46:10 PM UTC-4, Noam Postavsky wrote:
> Jaan Altosaar <altosaar@princeton.edu> writes:
> 
> > Thanks!
> >
> > I installed gnureadline. I could not rename the readline.so file as the
> > file moved to the /System/Library path in Mac High Sierra.
> >
> > FWIW I am not using the system python, but Anaconda 3 python (ipython
> > 6.4.0).
> >
> > Python 3.6.5 |Anaconda custom (64-bit)| (default, Apr 26 2018, 08:42:37).
> >
> > Is there anything else I should try?
> 
> You mean there was no change?  Perhaps instead of the /System/Library
> path you need to find where the libedit readline is installed for
> Anaconda.  Although I'm not sure where that would be.



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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
  2018-07-02 20:13 bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output Jaan Altosaar
  2018-07-02 20:32 ` Noam Postavsky
@ 2018-07-07 14:43 ` Noam Postavsky
  2018-07-07 16:42   ` Glenn Morris
  1 sibling, 1 reply; 15+ messages in thread
From: Noam Postavsky @ 2018-07-07 14:43 UTC (permalink / raw)
  To: 32042; +Cc: jaan.altosaar

[-- Attachment #1: Type: text/plain, Size: 118 bytes --]

[your message doesn't seem to show up on the bug thread, please use
"Reply All" to keep 32042@debbugs.gnu.org on Cc]


[-- Attachment #2: Type: message/rfc822, Size: 1424 bytes --]

From: jaan.altosaar@gmail.com
To: bug-gnu-emacs@gnu.org
Subject: Re: bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
Date: Fri, 6 Jul 2018 12:21:52 -0700 (PDT)
Message-ID: <291b6c7e-1e95-4ee1-bab7-4d8db52c0977@googlegroups.com>

There was no change; I still see the broken output in the original post...

```File "<ipython-input-1-57ce0cd600e5>", line 1, in <module>
    import codecs, os;__pyfile = codecs.open('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000gn/T/pyLbk6Vh''', encoding='''utf-8''')
```

I tried:

Disabling system integrity protection (booting into OS X High Sierra recovery mode and running `csrutil disable`), then 

```
cd /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload 
sudo mv readline.so readline.so.bak
```

and the same for the anaconda readline:

```
cd /usr/local/anaconda3/lib/python3.6/lib-dynload
mv readline.cpython-36m-darwin.so readline.cpython-36m-darwin.so.bak
```

And installing gnureadline.

Still getting the same broken output.
forwarding to list
Any other ideas?

[-- Attachment #3: Type: text/plain, Size: 223 bytes --]



Try in a python shell:

    print (readline.__doc__)
    print (readline.__file__)

The first to confirm that libedit readline is still being loaded, the
second to hopefully give some kind of hint where it's coming from.

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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
  2018-07-07 14:43 ` Noam Postavsky
@ 2018-07-07 16:42   ` Glenn Morris
  0 siblings, 0 replies; 15+ messages in thread
From: Glenn Morris @ 2018-07-07 16:42 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 32042, jaan.altosaar

Noam Postavsky wrote:

> [your message doesn't seem to show up on the bug thread, please use

It's because he posted via the newsgroup (I wish it would go away), not mail.





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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
  2018-07-03  0:45     ` Noam Postavsky
@ 2018-07-09 12:59       ` Jaan Altosaar
  2018-07-09 19:55         ` Noam Postavsky
       [not found]         ` <mailman.3332.1531166168.1292.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 15+ messages in thread
From: Jaan Altosaar @ 2018-07-09 12:59 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 32042@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]

My bad! Reply alling to keep 32042@debbugs.gnu.org in cc. Hope this works—

There was no change; I still see the broken output in the original post...

```File "<ipython-input-1-57ce0cd600e5>", line 1, in <module>
    import codecs, os;__pyfile =
codecs.open('''/var/folders/qr/s_h2rhqj6kdg8qrj0zw2scnw0000gn/T/pyLbk6Vh''',
encoding='''utf-8''')
```

I tried:

Disabling system integrity protection (booting into OS X High Sierra
recovery mode and running `csrutil disable`), then

```
cd
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
sudo mv readline.so readline.so.bak
```

and the same for the anaconda readline:

```
cd /usr/local/anaconda3/lib/python3.6/lib-dynload
mv readline.cpython-36m-darwin.so readline.cpython-36m-darwin.so.bak
```

And installing gnureadline.

Still getting the same broken output.

Any other ideas?

On Monday, July 2, 2018, Noam Postavsky <npostavs@gmail.com> wrote:

> Jaan Altosaar <altosaar@princeton.edu> writes:
>
> > Thanks!
> >
> > I installed gnureadline. I could not rename the readline.so file as the
> > file moved to the /System/Library path in Mac High Sierra.
> >
> > FWIW I am not using the system python, but Anaconda 3 python (ipython
> > 6.4.0).
> >
> > Python 3.6.5 |Anaconda custom (64-bit)| (default, Apr 26 2018, 08:42:37).
> >
> > Is there anything else I should try?
>
> You mean there was no change?  Perhaps instead of the /System/Library
> path you need to find where the libedit readline is installed for
> Anaconda.  Although I'm not sure where that would be.
>
>

[-- Attachment #2: Type: text/html, Size: 2409 bytes --]

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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
  2018-07-09 12:59       ` Jaan Altosaar
@ 2018-07-09 19:55         ` Noam Postavsky
       [not found]         ` <mailman.3332.1531166168.1292.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 15+ messages in thread
From: Noam Postavsky @ 2018-07-09 19:55 UTC (permalink / raw)
  To: Jaan Altosaar; +Cc: 32042@debbugs.gnu.org

On 9 July 2018 at 08:59, Jaan Altosaar <altosaar@princeton.edu> wrote:
> My bad! Reply alling to keep 32042@debbugs.gnu.org in cc. Hope this works—

> Still getting the same broken output.
>
> Any other ideas?

Can you show the result of the python expressions at the bottom of
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32042#19





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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
       [not found]         ` <mailman.3332.1531166168.1292.bug-gnu-emacs@gnu.org>
@ 2018-07-10 22:09           ` Jaan Altosaar
  2018-07-10 22:36             ` Noam Postavsky
       [not found]             ` <mailman.3400.1531262228.1292.bug-gnu-emacs@gnu.org>
  2018-07-10 22:14           ` Jaan Altosaar
  1 sibling, 2 replies; 15+ messages in thread
From: Jaan Altosaar @ 2018-07-10 22:09 UTC (permalink / raw)
  To: gnu.emacs.bug@googlegroups.com; +Cc: 32042@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

Thanks!

 It looks like it's the anaconda readline:

```
Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 11:07:29)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.
>>> import readline; print(readline.__doc__); print(readline.__file__)
Importing this module enables command line editing using GNU readline.
/usr/local/anaconda3/lib/python3.6/site-packages/
readline.cpython-36m-darwin.so
```

I tried using gnureadline too but get the same broken output.

```
>>> import readline
>>> print(readline.__doc__); print(readline.__file__)
Importing this module enables command line editing using GNU readline.
/usr/local/anaconda3/lib/python3.6/site-packages/readline.py
>>> cat /usr/local/anaconda3/lib/python3.6/site-packages/readline.py
from gnureadline import *
from gnureadline import __doc__
```

On Monday, July 9, 2018, Noam Postavsky <npostavs@gmail.com> wrote:

> On 9 July 2018 at 08:59, Jaan Altosaar <altosaar@princeton.edu> wrote:
> > My bad! Reply alling to keep 32042@debbugs.gnu.org in cc. Hope this
> works—
>
> > Still getting the same broken output.
> >
> > Any other ideas?
>
> Can you show the result of the python expressions at the bottom of
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32042#19
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 2118 bytes --]

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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
       [not found]         ` <mailman.3332.1531166168.1292.bug-gnu-emacs@gnu.org>
  2018-07-10 22:09           ` Jaan Altosaar
@ 2018-07-10 22:14           ` Jaan Altosaar
  1 sibling, 0 replies; 15+ messages in thread
From: Jaan Altosaar @ 2018-07-10 22:14 UTC (permalink / raw)
  To: 32042

[-- Attachment #1: Type: text/plain, Size: 1361 bytes --]

Thanks! It looks like it's the anaconda readline:

```
Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 11:07:29)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.
>>> import readline; print(readline.__doc__); print(readline.__file__)
Importing this module enables command line editing using GNU readline.
/usr/local/anaconda3/lib/python3.6/site-packages/
readline.cpython-36m-darwin.so
```

I tried using gnureadline too but get the same broken output.

```
>>> import readline
>>> print(readline.__doc__); print(readline.__file__)
Importing this module enables command line editing using GNU readline.
/usr/local/anaconda3/lib/python3.6/site-packages/readline.py
>>> cat /usr/local/anaconda3/lib/python3.6/site-packages/readline.py
from gnureadline import *
from gnureadline import __doc__
```

On Monday, July 9, 2018, Noam Postavsky <npostavs@gmail.com> wrote:

> On 9 July 2018 at 08:59, Jaan Altosaar <altosaar@princeton.edu> wrote:
> > My bad! Reply alling to keep 32042@debbugs.gnu.org in cc. Hope this
> works—
>
> > Still getting the same broken output.
> >
> > Any other ideas?
>
> Can you show the result of the python expressions at the bottom of
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32042#19
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 2091 bytes --]

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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
  2018-07-10 22:09           ` Jaan Altosaar
@ 2018-07-10 22:36             ` Noam Postavsky
       [not found]             ` <mailman.3400.1531262228.1292.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 15+ messages in thread
From: Noam Postavsky @ 2018-07-10 22:36 UTC (permalink / raw)
  To: Jaan Altosaar; +Cc: 32042@debbugs.gnu.org

Jaan Altosaar <altosaar@princeton.edu> writes:

> Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 11:07:29)
> Type 'copyright', 'credits' or 'license' for more information
> IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.
>>>> import readline; print(readline.__doc__); print(readline.__file__)
> Importing this module enables command line editing using GNU readline.

Hmm, maybe it's not the same problem then.  Do you see the same "using
GNU readline" output when doing the same from within Emacs?

PS now your messages are arriving in duplicate for some reason.






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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
       [not found]             ` <mailman.3400.1531262228.1292.bug-gnu-emacs@gnu.org>
@ 2018-07-10 22:51               ` Jaan Altosaar
  2018-07-11  0:32                 ` Noam Postavsky
  0 siblings, 1 reply; 15+ messages in thread
From: Jaan Altosaar @ 2018-07-10 22:51 UTC (permalink / raw)
  To: gnu.emacs.bug@googlegroups.com; +Cc: 32042@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]

This is from within emacs.

Contents of init.el:

```
(setq
 python-shell-interpreter "ipython"
 python-shell-interpreter-args "--simple-prompt --classic --nosep"
)
```

And launching the prompt with `M-x run-python`.

Sorry for the double messages; I resent only to
32042@debbugs.gnu.org because I received this message:

Address not found
Your message wasn't delivered to gnu.emacs.bug@googlegroups.com because the
address couldn't be found, or is unable to receive mail.

On Tuesday, July 10, 2018, Noam Postavsky <npostavs@gmail.com> wrote:

> Jaan Altosaar <altosaar@princeton.edu> writes:
>
> > Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 11:07:29)
> > Type 'copyright', 'credits' or 'license' for more information
> > IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.
> >>>> import readline; print(readline.__doc__); print(readline.__file__)
> > Importing this module enables command line editing using GNU readline.
>
> Hmm, maybe it's not the same problem then.  Do you see the same "using
> GNU readline" output when doing the same from within Emacs?
>
> PS now your messages are arriving in duplicate for some reason.
>
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 2105 bytes --]

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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
  2018-07-10 22:51               ` Jaan Altosaar
@ 2018-07-11  0:32                 ` Noam Postavsky
  2021-09-05  7:42                   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Noam Postavsky @ 2018-07-11  0:32 UTC (permalink / raw)
  To: Jaan Altosaar; +Cc: 32042@debbugs.gnu.org

unmerge 32042
tags 32042 + confirmed
retitle 32042 26.1; python-shell-send-buffer with ipython 6.x shows "plumbing" code along with python error message
quit

Jaan Altosaar <altosaar@princeton.edu> writes:

> This is from within emacs.

Oh right, I forgot the bad output only happens when you send from file
or buffer.

I dusted off my Arch box, and I can see the same problem there (it has
ipython 6.3.1).  I don't see it on my normal Debian box which has
ipython 5.1.0.  So something must have changed in ipython's behaviour.

> Sorry for the double messages; I resent only to
> 32042@debbugs.gnu.org because I received this message:
>
> Address not found
> Your message wasn't delivered to gnu.emacs.bug@googlegroups.com because the
> address couldn't be found, or is unable to receive mail.

Ah, the gnu.emacs.bug@googlegroups.com email address is indeed bogus,
but as long as the 32042@debbugs.gnu.org message goes through, the bug
tracker is fine.






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

* bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output
  2018-07-11  0:32                 ` Noam Postavsky
@ 2021-09-05  7:42                   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-05  7:42 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 32042@debbugs.gnu.org, Jaan Altosaar

Noam Postavsky <npostavs@gmail.com> writes:

> unmerge 32042
> tags 32042 + confirmed
> retitle 32042 26.1; python-shell-send-buffer with ipython 6.x shows
> "plumbing" code along with python error message
> quit

This should now be fixed in Emacs 28 with:

commit c9b173ffea1fe41da385cea135c894fcf523e917 (HEAD -> master)
Author:     Augusto Stoffel <arstoffel@gmail.com>
AuthorDate: Sat Sep 4 11:16:11 2021 +0200

So 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] 15+ messages in thread

end of thread, other threads:[~2021-09-05  7:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 20:13 bug#32042: 26.1; python.el with ipython prompt leads to superfluous interactive shell output Jaan Altosaar
2018-07-02 20:32 ` Noam Postavsky
2018-07-02 21:18   ` Jaan Altosaar
2018-07-03  0:45     ` Noam Postavsky
2018-07-09 12:59       ` Jaan Altosaar
2018-07-09 19:55         ` Noam Postavsky
     [not found]         ` <mailman.3332.1531166168.1292.bug-gnu-emacs@gnu.org>
2018-07-10 22:09           ` Jaan Altosaar
2018-07-10 22:36             ` Noam Postavsky
     [not found]             ` <mailman.3400.1531262228.1292.bug-gnu-emacs@gnu.org>
2018-07-10 22:51               ` Jaan Altosaar
2018-07-11  0:32                 ` Noam Postavsky
2021-09-05  7:42                   ` Lars Ingebrigtsen
2018-07-10 22:14           ` Jaan Altosaar
     [not found]     ` <mailman.2978.1530578768.1292.bug-gnu-emacs@gnu.org>
2018-07-06 19:21       ` jaan.altosaar
2018-07-07 14:43 ` Noam Postavsky
2018-07-07 16:42   ` Glenn Morris

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).