bug#29592: 25.3; python does not print input or output in the inferior process

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#29592: 25.3; python does not print input or output in the inferior process

Alex Branham
In python-mode (from python.el), writing

import pandas as pd
pd.Series([1, 2, 3, 4, 5])

after starting an inferior python process, selecting the buffer, and
running M-x python-shell-send-region no output is printed in the process
buffer even though the statements are evaluated.

If you manually type pd.Series([1, 2, 3, 4, 5]) into the python process
buffer, it prints

0    1
1    2
2    3
3    4
dtype: int64

I think ideally, Emacs should show that the statements are sent to the interpreter by printing them and also show their output so running python-shell-send-region from above would leave the inferior process buffer looking something like:

>>> import pandas as pd
>>> pd.Series([1, 2, 3, 4, 5])
0    1
1    2
2    3
3    4
4    5
dtype: int64
>>>


In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.19)
 of 2017-09-16 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

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



Reply | Threaded
Open this post in threaded view
|

bug#29592: 25.3; python does not print input or output in the inferior process

Noam Postavsky-2
severity 29592 wishlist
quit

Alex Branham <[hidden email]> writes:

> In python-mode (from python.el), writing
>
> import pandas as pd
> pd.Series([1, 2, 3, 4, 5])
>
> after starting an inferior python process, selecting the buffer, and
> running M-x python-shell-send-region no output is printed in the process
> buffer even though the statements are evaluated.
>
> If you manually type pd.Series([1, 2, 3, 4, 5]) into the python process
> buffer, it prints
>
> 0    1
> 1    2
> 2    3
> 3    4
> dtype: int64
>
> I think ideally, Emacs should show that the statements are sent to the
> interpreter by printing them and also show their output so running
> python-shell-send-region from above would leave the inferior process
> buffer looking something like:
>
>>>> import pandas as pd
>>>> pd.Series([1, 2, 3, 4, 5])
> 0    1
> 1    2
> 2    3
> 3    4
> 4    5
> dtype: int64
>>>>

python-shell-send-region works by saving to a temp file, and loading
that.  I think sending each statement separately should be a separate
command.