From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gunnar Horrigmo Newsgroups: gmane.emacs.bugs Subject: bug#43450: 28.0.50; Python shell doesn't echo if shebang Date: Wed, 16 Sep 2020 15:23:22 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16034"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 43450@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 16 17:25:20 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIZJ9-00042y-AP for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Sep 2020 17:25:19 +0200 Original-Received: from localhost ([::1]:33598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIZJ8-0007SU-9B for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Sep 2020 11:25:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIZIs-0007Pz-Vs for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2020 11:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIZIs-0006IR-Mu for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2020 11:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kIZIs-0001rL-Ex for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2020 11:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gunnar Horrigmo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Sep 2020 15:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43450 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16002698937118 (code B ref -1); Wed, 16 Sep 2020 15:25:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Sep 2020 15:24:53 +0000 Original-Received: from localhost ([127.0.0.1]:35719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIZIi-0001qj-QQ for submit@debbugs.gnu.org; Wed, 16 Sep 2020 11:24:53 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIXPd-0006ft-3t for submit@debbugs.gnu.org; Wed, 16 Sep 2020 09:23:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIXPc-0004BC-Tc for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2020 09:23:52 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:46998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIXPY-0004GE-CB for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2020 09:23:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.no; s=selector2; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=l9blXYDCB4jQjzgnMATM6fg901vyfUkfNS0ePPyP7Ek=; b=VrNdwPIHOjh9yt7u7A2GgL3dN KSaVhn/uH9PVSd5+LAdYBrdVcPQdlYSE37TYhgerCwPtRGmgMVS5W2bsddEkB1jvmWACAt7EtAl46 UWvsxoKmxN3slS2NnH9mRSpHG0iha2QcmJhmdXRG4ouAXt+SIzVm5/WzAZ+R746N1nERIyDvZH1km KYgoyymo3+sHWDV4Jjh0/ryzHxi33yCcn70EV4I2Zf+t6Nb2xXVqJwS5o9SIqmrv3Qjh3cyw/t9Kg 3TH2AD3vHGoP2tHn9OG3GmTioklCYa97fpgO470g3YgrbSaBTyMIPueoOcwsGNt74dratdT7B+y6S wQxK3jbgA==; Original-Received: from [10.9.9.74] (helo=submission03.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1kIXPM-0004Yd-Fa for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2020 15:23:36 +0200 Original-Received: by submission03.runbox with esmtpsa [Authenticated alias (9149)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1kIXP8-0000BO-9N for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2020 15:23:22 +0200 Received-SPF: pass client-ip=91.220.196.211; envelope-from=horrigmo@runbox.no; helo=aibo.runbox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/16 09:23:37 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 16 Sep 2020 11:24:51 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188172 Archived-At: Open a .py file M-x run-python RET In .py file, write some statement, say "1+2" and evaluate it with (f.ex.) python-shell-send-statement. Observe that python shell echoes the result, "3", and prompts on a new line. Add a shebang to the top of .py file (f.ex. "#!/usr/bin/pyton3" on my system). Evaluate the same statement as over. Observe that python shell doesn't echo the result, but does print a new prompt, but without a newline. You can add and remove the shebang as much you want, and see the echo behaviour change accordingly. You do _not_ need to save the file. You can see a replay of the issue here: https://asciinema.org/a/DOq15ldlyiKI5HKLrKpF7gIeg I've verified this behaviour using emacs -Q on versions 28.0.50 (including master HEAD as of 2020-09-16) and 27.1.50. And it seems all the python-shell-send-* functions exhibit the same, not just python-shell-send-statement. In GNU Emacs 28.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.13, cairo version 1.16.0) of 2020-05-23 built on hot-rats.uio.no Repository revision: f8581bcf6a1942ebd331cae20e32945a3a86a3d1 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Fedora 31 (Workstation Edition) Recent messages: Checking 71 files in /home/horrigmo/src/emacs/emacs/lisp/erc... Checking 34 files in /home/horrigmo/src/emacs/emacs/lisp/emulation... Checking 180 files in /home/horrigmo/src/emacs/emacs/lisp/emacs-lisp... Checking 24 files in /home/horrigmo/src/emacs/emacs/lisp/cedet... Checking 59 files in /home/horrigmo/src/emacs/emacs/lisp/calendar... Checking 87 files in /home/horrigmo/src/emacs/emacs/lisp/calc... Checking 105 files in /home/horrigmo/src/emacs/emacs/lisp/obsolete... Checking for load-path shadows...done C-x C-g is undefined [2 times] Buffer *unsent mail to bug-gnu-emacs@gnu.org* modified; kill anyway? (y or n) y Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER LCMS2 GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ERC Minor modes in effect: erc-list-mode: t erc-menu-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t erc-autojoin-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t shell-dirtrack-mode: t savehist-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t Load-path shadows: None found. Features: (shadow emacsbug erc-list erc-menu erc-ring erc-networks erc-pcomplete erc-button erc-fill erc-stamp erc-netsplit erc-join erc-track erc-match erc-goodies erc erc-backend erc-compat thingatpt pp erc-loaddefs mailalias bbdb-message nnir vc-git diff-mode easy-mmode sort gnus-cite smiley shr-color mm-archive mail-extr gnus-async gnus-bcklg mule-util qp gnus-ml disp-table gnus-topic nndraft nnmh utf-7 gnutls bbdb-gnus network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 nntp gnus-cache gnus-sum url url-proxy url-privacy url-expand url-methods url-history shr url-cookie url-domsuf url-util svg xml dom gnus-group gnus-undo powerline advice powerline-separators color cyberpunk-theme powerline-themes cus-edit cus-start cus-load tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete comint ansi-color ring ls-lisp ido nnfolder smtpmail sendmail mm-view mml-smime smime dig mailcap gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message rmc puny format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search time-date mail-utils mm-util mail-prsvr wid-edit server pinentry epa-file epa derived epg epg-config yatemplate autoinsert cl-extra yasnippet help-mode edmacro kmacro dired-sidebar face-remap dired-subtree dired-hacks-utils dash dired dired-loaddefs bbdb-mua bbdb-com crm mailabbrev bbdb bbdb-site timezone finder-inf info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt bytecomp byte-compile cconv make-password cl-macs help-misc markstack cl doders html-misc stoffe-misc gv savehist avoid cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 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 threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 441208 78375) (symbols 48 30936 1) (strings 32 123601 7188) (string-bytes 1 3885469) (vectors 16 47667) (vector-slots 8 1304186 200108) (floats 8 378 407) (intervals 56 4655 1922) (buffers 992 33)) -- Gunnar