GNU bug report logs - #29592
25.3; python does not print input or output in the inferior process

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Alex Branham <alex.branham@HIDDEN>; merged with #30632; dated Wed, 6 Dec 2017 19:00:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 29592 30632. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 29592 <at> debbugs.gnu.org:


Received: (at 29592) by debbugs.gnu.org; 12 Dec 2017 23:28:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 12 18:28:24 2017
Received: from localhost ([127.0.0.1]:59077 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eOtyK-0000UR-0t
	for submit <at> debbugs.gnu.org; Tue, 12 Dec 2017 18:28:24 -0500
Received: from mail-it0-f43.google.com ([209.85.214.43]:42665)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1eOtyH-0000U2-9n; Tue, 12 Dec 2017 18:28:21 -0500
Received: by mail-it0-f43.google.com with SMTP id p139so1735679itb.1;
 Tue, 12 Dec 2017 15:28:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=7wZ2LRgTX9vUGMbginf1yYqh9EkfiDX5zsR8+MoXOSM=;
 b=KqWb2o9G7yUW/aUhj3dRBCQYVmSx+nBS1/g7pnIT7vR03+vUA235NyAM52h63bkDMB
 SN5mN77RNZdChknSQAwH//XJ38Ol/bHBImSJjgZD20s5+9XcOJEs90iBWz5fQ3gFdVdv
 4QnzBnQ8PPiLxSZQ8ouAA0/JfeBUzoPHFoHIDQS63lXZG7mAHH4DTVFyG6EagS9fWcoR
 E3eODYEKXLbY6R8C0Qkool5A09AbZP/Hn8VKNd0X0VYkgQApzq/Vt7Dv1Bk0f0BV3czZ
 NKWHPG7k+KIaah/k78RhB6ohVQZLvp8r1CRpwiVsIaxg+szwhNydhVoZUrweIVPYze5+
 FxVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=7wZ2LRgTX9vUGMbginf1yYqh9EkfiDX5zsR8+MoXOSM=;
 b=elL7jhT64DCCMsah2vooTEtreyNT02VDylbLblR5OT9ZtSlxEejjdKaznR3LJdbeIh
 FK0IcASKtk4tKbXvP9HV2nRCwIgNUFjGkMDB8ptIHN6c1dtgsY4pqeQNfswccMwSmEhz
 tUJ6p59b4w7l7/9/w4GzTlSPip77d2VO0ByixgrJfmBGsN+BC5b6yWpv1i3rDaW2dfh5
 bfDp8wJcD6stOPIdgZdhibR5U2SItrgMlS+kAm7OjUkVrCgbZiX9NJiu53HTWnw776Ie
 f5QX8BARn7wO7JL90ANdNCGzHDDlO67iVej5SOpJiLhPHQltnQY7eBRABPGiFga26FyS
 4TdA==
X-Gm-Message-State: AKGB3mIl1bZpf1UwyNz6mT3reFsdKIiyZH9FVPJ0DWgMN/ClOFBpd1ca
 uBvU9hFo1ZPfNsdJc85i8fJ9pFWJ
X-Google-Smtp-Source: ACJfBotOxKNih8OpsiHjxWM7PsqhyuKODNSMC6J5vu8Pbcqx7/oDGBFhuEAb+wFoGrkTULHr3S0yRA==
X-Received: by 10.36.91.15 with SMTP id g15mr581097itb.141.1513121295691;
 Tue, 12 Dec 2017 15:28:15 -0800 (PST)
Received: from zebian ([45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id d128sm154141iod.35.2017.12.12.15.28.10
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 12 Dec 2017 15:28:14 -0800 (PST)
From: Noam Postavsky <npostavs@HIDDEN>
To: Alex Branham <alex.branham@HIDDEN>
Subject: Re: bug#29592: 25.3;
 python does not print input or output in the inferior process
References: <87indjel8l.fsf@HIDDEN>
Date: Tue, 12 Dec 2017 18:28:01 -0500
In-Reply-To: <87indjel8l.fsf@HIDDEN> (Alex Branham's message of "Wed, 06
 Dec 2017 12:59:06 -0600")
Message-ID: <87o9n3cyri.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 29592
Cc: 29592 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

severity 29592 wishlist
quit

Alex Branham <alex.branham@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29592; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Dec 2017 18:59:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 06 13:59:22 2017
Received: from localhost ([127.0.0.1]:49438 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eMeuf-0008SM-Ng
	for submit <at> debbugs.gnu.org; Wed, 06 Dec 2017 13:59:21 -0500
Received: from eggs.gnu.org ([208.118.235.92]:48248)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <alex.branham@HIDDEN>) id 1eMeue-0008SA-FY
 for submit <at> debbugs.gnu.org; Wed, 06 Dec 2017 13:59:20 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <alex.branham@HIDDEN>) id 1eMeuY-0000IC-Lo
 for submit <at> debbugs.gnu.org; Wed, 06 Dec 2017 13:59:15 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:51065)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <alex.branham@HIDDEN>)
 id 1eMeuY-0000I3-HT
 for submit <at> debbugs.gnu.org; Wed, 06 Dec 2017 13:59:14 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39212)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <alex.branham@HIDDEN>) id 1eMeuX-0008Pp-Bu
 for bug-gnu-emacs@HIDDEN; Wed, 06 Dec 2017 13:59:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <alex.branham@HIDDEN>) id 1eMeuU-0000Ep-9p
 for bug-gnu-emacs@HIDDEN; Wed, 06 Dec 2017 13:59:13 -0500
Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:35456)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <alex.branham@HIDDEN>)
 id 1eMeuU-0000ET-5N
 for bug-gnu-emacs@HIDDEN; Wed, 06 Dec 2017 13:59:10 -0500
Received: by mail-oi0-x22d.google.com with SMTP id 184so3256157oii.2
 for <bug-gnu-emacs@HIDDEN>; Wed, 06 Dec 2017 10:59:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=user-agent:from:to:subject:date:message-id:mime-version;
 bh=zqSlPMFV8z0gZjZ+ozIuL5Wo96K1GSr0D/vSRGFAL7Y=;
 b=p74W6edd9Ix477+s3qsXeZvo4TzgH7bXyCRZNS3x7gbH9Iod/PiYfi43UiqS1mktDF
 ZnJb7DpFfZ3ZSGK1E1Qq6lOcTjH4BLKiCbLG4TnSWuhRM+OYmQRkEHFL/lByJeRDjqmj
 kkBcY2hrrjhmWSRurgQyARMxtFXnBUSL+g65Da9ZZom7vgRuvhfVqC0H380ekashX57X
 tnc6ttVp4Hn5Smn1b55g9rvXd1tF9SdHW6i+FFhr6fBCM2q63KSPIDysvGCVaZw9kPn1
 4lf4zqcpJzpCd0x1cykGv2Ma3LawnHi1RnTp8EVQQKiI3Czx/XNGa0S6aiI6Wn4sjQzP
 25aA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:user-agent:from:to:subject:date:message-id
 :mime-version;
 bh=zqSlPMFV8z0gZjZ+ozIuL5Wo96K1GSr0D/vSRGFAL7Y=;
 b=QSnNywVoF8AduPWii3sJNDe0NChsj5C31cejlBgzJAFlkV1lKrit9rmLPA+MMXR93S
 TUdfiFjxiW5TttQBjwzh0xbZcHREmddTAibwpVLkdyGDXA9Tv5UG8V6XL74ug5JnEfRC
 nG3CU50wYf4b61/w3tb8smfqYdmihfnY2XYgOpPfAaQUZkv0pXZvW6PKvIo1PSp91RJl
 5J0Th9x4LH3/TrkpBSu/RZoscAKUU7Wgfy1eFwA/ukxqK5Hi9ATPU8vYzQo4DMMBT/B7
 meECqoXgGRJLEZznJPVKauDHjmYRx63il4IpNkcxKy06E1bnForYVAiOdSrIppbYoDXZ
 OEjw==
X-Gm-Message-State: AJaThX4eYstllWmlD1AkxQwHtWn2JFFgOxD25SS0ZbXfoqe4lEf/EVIQ
 k4yMmrkqMv329rJ1ESTBujrkY2PF
X-Google-Smtp-Source: AGs4zMYQ6hBF9LFySFBRZyyLjE1jN96bOnAsXlBldcc1X1apn5ADMZPAr9SxYeNxP2BkVIpxj/RYFA==
X-Received: by 10.202.61.6 with SMTP id k6mr19015246oia.273.1512586748798;
 Wed, 06 Dec 2017 10:59:08 -0800 (PST)
Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208])
 by smtp.gmail.com with ESMTPSA id
 d50sm1508582otf.8.2017.12.06.10.59.08 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 06 Dec 2017 10:59:08 -0800 (PST)
User-agent: mu4e 0.9.18; emacs 25.3.1
From: Alex Branham <alex.branham@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.3; python does not print input or output in the inferior process
Date: Wed, 06 Dec 2017 12:59:06 -0600
Message-ID: <87indjel8l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

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




Acknowledgement sent to Alex Branham <alex.branham@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#29592; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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