From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#26326: 25.1; "import codecs, os; ..." Weird output in python shell Mac OS X Date: Fri, 31 Mar 2017 15:53:57 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1490990119 11420 195.159.176.226 (31 Mar 2017 19:55:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 31 Mar 2017 19:55:19 +0000 (UTC) Cc: 26326@debbugs.gnu.org To: Monib Ahmed Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 31 21:55:12 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 1cu2dW-0001bl-Gv for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Mar 2017 21:55:06 +0200 Original-Received: from localhost ([::1]:42678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cu2dc-0005XF-DB for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Mar 2017 15:55:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cu2dW-0005Ui-2d for bug-gnu-emacs@gnu.org; Fri, 31 Mar 2017 15:55:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cu2dT-00069K-1l for bug-gnu-emacs@gnu.org; Fri, 31 Mar 2017 15:55:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56622) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cu2dS-00069B-UN for bug-gnu-emacs@gnu.org; Fri, 31 Mar 2017 15:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cu2dS-0002MH-Gl for bug-gnu-emacs@gnu.org; Fri, 31 Mar 2017 15:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Mar 2017 19:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26326 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26326-submit@debbugs.gnu.org id=B26326.14909900458986 (code B ref 26326); Fri, 31 Mar 2017 19:55:02 +0000 Original-Received: (at 26326) by debbugs.gnu.org; 31 Mar 2017 19:54:05 +0000 Original-Received: from localhost ([127.0.0.1]:54821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cu2cX-0002Kn-I7 for submit@debbugs.gnu.org; Fri, 31 Mar 2017 15:54:05 -0400 Original-Received: from mail-oi0-f54.google.com ([209.85.218.54]:35454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cu2cV-0002KB-VE for 26326@debbugs.gnu.org; Fri, 31 Mar 2017 15:54:04 -0400 Original-Received: by mail-oi0-f54.google.com with SMTP id f193so72466840oib.2 for <26326@debbugs.gnu.org>; Fri, 31 Mar 2017 12:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=R/AMCwNOLEE6tc3URAwo2jMrEeqzapcpjJrHcwoRlZw=; b=DamD9nIDQHivC3f21TRK7xKw5C5EAc8JUeLJY+Gg5thdo7Q1bhxuaXFHDmsrff7HUV 8zhIVQnrUfc8qUFO69U0EIwCOva81DGbLF1AgU06Y+VyOWCu2Pq+w+Z2eXKwW+v977vY t6D4cIWtoVvgIOg8Zc75jtptZ+2ZcaYiOGwm80J234UTcWI9ljap7QsKm0zwnLP3ti+/ GD5udqZFn11XHoRmUx8XjKc9Obvt19SQj++tmOk+vM6RNB3O6KQSfk+1jTAPSBimdZX2 aDDtPgevy5aKrvnqs+5fkxwcUxN6/KkqKXzuAzZ6lNw0Mjo7SIZJxmXUrtxrQNmQKR/z Ii8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=R/AMCwNOLEE6tc3URAwo2jMrEeqzapcpjJrHcwoRlZw=; b=LIBPIKYQzs2RgDma1wMuPdZwN0LmpZvaw+UhWSYM/rszo37RaVpFRVFQ35KpilaAXK N6igp7he/eOoc7DSelEMUwrK3F5XSfSEl88kuScwVXryOORCZrXUvEwGF8OqzR0R3zMN fNmr9isrrQtrhko1aL6jxKrLfjiQLkDBIEIyRgug56K1xUQDj9tHy2GXG5u67CaHpbcG HVqLFUMGecOZwVuMpfHp7zsgfg3tlUussH2vVwyO+uu4CnIzM6CL93VSbA+ogqyoraz0 qaNtYwXjMZHTDL4WZ8wswO85dl4mNm3sdXoLEOoAORN7aQnq/qQic8lVB4SqX48FgsJB SYgg== X-Gm-Message-State: AFeK/H0pTA3RjxcZdDLJ1kfo86AjcrgptMEeGaGFAUAHavGHujFbCDVvI3piq18cvuw/vlSBGUT6mZKgtVxdGg== X-Received: by 10.157.68.237 with SMTP id p45mr3146640otg.244.1490990037446; Fri, 31 Mar 2017 12:53:57 -0700 (PDT) Original-Received: by 10.157.80.133 with HTTP; Fri, 31 Mar 2017 12:53:57 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: tkdnyRdQ5BK-UlVxXRc-rOB1FAE 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:131146 Archived-At: merge 25753 26326 quit On Fri, Mar 31, 2017 at 3:14 PM, Monib Ahmed wrote: > > Hi, I wrote a simple "Hello World" python script, and the output is > weird: > >>>> import codecs, os;__pyfile = >>>> codecs.open('''/var/folders/f9/y1xt5ytn02v2n7p8pk3_h4xw0000gn/T/py1281TtN''', >>>> encoding='''utf-8''');__code = >>>> __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/f9/y1xt5ytn02v2n7p8pk3_h4xw0000gn/T/py1281TtN''');exec(compile(__code, >>>> '''/Users/monibahmed/Documents/Python/people_class/hello_world.py''', >>>> 'exec')); > Hi > Hello World! >>>> > > Any recommendation on how to fix this? Perhaps you can figure out how to make Emacs' python code (see __PYTHON_EL_native_completion_setup() in python.el) work properly with a libedit based readline? Otherwise, you can work around it by installing a GNU readline based readline module: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753#74