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

From: Noam Postavsky <[email-masked]>
Date: Tue, 12 Dec 2017 18:28:01 -0500

severity 29592 wishlist
quit

Alex Branham <[email-masked]> 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.