GNU bug report logs - #26326
25.1; "import codecs, os;..." Weird output in python shell Mac OS X

Previous Next

Package: emacs;

Reported by: Monib Ahmed <MonibAhmed <at> gmail.com>

Date: Fri, 31 Mar 2017 19:34:02 UTC

Severity: normal

Merged with 21431, 22796, 25753

Found in versions 24.5, 25.1, 25.2, 26.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 26326 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Monib Ahmed <MonibAhmed <at> gmail.com>
Cc: 26326 <at> debbugs.gnu.org
Subject: Re: bug#26326: 25.1; "import codecs, os; ..." Weird output in python
 shell Mac OS X
Date: Fri, 31 Mar 2017 15:53:57 -0400
merge 25753 26326
quit

On Fri, Mar 31, 2017 at 3:14 PM, Monib Ahmed <MonibAhmed <at> gmail.com> 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




This bug report was last modified 1 year and 270 days ago.

Previous Next


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