From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.bugs Subject: bug#25753: 25.2; Python mode shell interaction not working 100% Date: Sat, 25 Feb 2017 15:11:56 +0100 Message-ID: References: <83lgt6xbr0.fsf@gnu.org> <87poifjsw2.fsf@users.sourceforge.net> <87poibgfyw.fsf@users.sourceforge.net> <87o9xtf0q6.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1488031992 8453 195.159.176.226 (25 Feb 2017 14:13:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Feb 2017 14:13:12 +0000 (UTC) Cc: 25753@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 25 15:13:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chd5u-0001UB-5W for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Feb 2017 15:13:06 +0100 Original-Received: from localhost ([::1]:42876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chd5z-0000Sh-VI for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Feb 2017 09:13:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chd5t-0000Rk-SQ for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 09:13:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chd5q-00040v-Oa for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 09:13:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57088) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1chd5q-00040n-L3 for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 09:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1chd5p-0005dR-Sd for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 09:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Feb 2017 14:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25753 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25753-submit@debbugs.gnu.org id=B25753.148803193221605 (code B ref 25753); Sat, 25 Feb 2017 14:13:01 +0000 Original-Received: (at 25753) by debbugs.gnu.org; 25 Feb 2017 14:12:12 +0000 Original-Received: from localhost ([127.0.0.1]:55287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chd52-0005cP-F2 for submit@debbugs.gnu.org; Sat, 25 Feb 2017 09:12:12 -0500 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:50703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chd4z-0005c9-KH for 25753@debbugs.gnu.org; Sat, 25 Feb 2017 09:12:11 -0500 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 9537F2237E for <25753@debbugs.gnu.org>; Sat, 25 Feb 2017 14:08:56 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-type:content-type:mime-version:message-id:in-reply-to :date:date:references:subject:subject:to:from:from; s=dkim; t= 1488031733; x=1488895734; bh=u/46wFGP8Fmm4aqqXCQDXs9jodwuezEzgPH CPtjF8xM=; b=YG+ysVF0un8lW4ADmzrw62IiDWdem8SlhfWMiaZRJverdLaGwe0 UIVvhyunACqVXS8tbScPAphhbLvzppwabuMk+O+yEfemOQzJU65gs6XCJop/xeS8 9gKgcw+NvDmMDzwAo+CeRRwo1evoVY1SwXgFlfDq0uSHbVXL/6HtduBk= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5jJCRen1YHzj for <25753@debbugs.gnu.org>; Sat, 25 Feb 2017 14:08:53 +0000 (UTC) Original-Received: from gray (54.4.4.85.dynamic.wline.res.cust.swisscom.ch [85.4.4.54]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 1D1D02233E; Sat, 25 Feb 2017 14:08:51 +0000 (UTC) In-Reply-To: <87o9xtf0q6.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Thu, 23 Feb 2017 09:20:01 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129785 Archived-At: Could you please evaluate these forms with a running instance of Python in Emacs? My output follows each form. It seems like the Mac version of Python echoes the last command sent, and maybe python.el does not expect this? Notice in the third example, the correct result appears, but is preceded by the code sent to the interpreter (which should be omitted as garbage). (python-shell-send-string-no-output "import os\nimport sys") => "import codecs, os;__pyfile = codecs.open('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167Tvh''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167Tvh''');exec(compile(__code, '''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167Tvh''', 'exec'));" (python-shell-send-string-no-output "import os; import sys") => "import os; import sys" (python-ffap-module-path "os") => "import codecs, os;__pyfile = codecs.open('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167tDu''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167tDu''');exec(compile(__code, '''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py167tDu''', 'exec'));^M /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py"