* bug#26326: 25.1; "import codecs, os; ..." Weird output in python shell Mac OS X
@ 2017-03-31 19:14 Monib Ahmed
2017-03-31 19:53 ` Noam Postavsky
0 siblings, 1 reply; 2+ messages in thread
From: Monib Ahmed @ 2017-03-31 19:14 UTC (permalink / raw)
To: 26326
[-- Attachment #1: Type: text/plain, Size: 5104 bytes --]
From: Monib Ahmed <monibahmed@Monibs-MacBook-Pro.local>
To: bug-gnu-emacs@gnu.org
Subject: 25.1; "import codecs, os;..." Weird output in python shell Mac OS X
--text follows this line--
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?
Thanks,
Monib
In GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version
10.9.5 (Build 13F1911))
of 2016-09-20 built on builder10-9.porkrind.org
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'
Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
diff-auto-refine-mode: t
pyvenv-mode: t
shell-dirtrack-mode: t
global-linum-mode: t
linum-mode: t
show-paren-mode: t
save-place-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
transient-mark-mode: t
Recent messages:
Mark set
Mark saved where search started
Mark set
Mark saved where search started
Saving file /Users/monibahmed/.emacs.d/init.el...
Wrote /Users/monibahmed/.emacs.d/init.el
Mark saved where search started
(No changes need to be saved)
previous-line: Beginning of buffer [2 times]
next-line: End of buffer [14 times]
previous-line: Beginning of buffer [3 times]
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message dired rfc822 mml mml-sec epg
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums misearch multi-isearch
vc-git diff-mode easy-mmode warnings tramp-cache thingatpt
company-oddmuse company-keywords company-etags company-gtags
company-dabbrev-code company-dabbrev company-files company-cmake
company-xcode company-clang company-eclim company-template company-css
company-nxml company-bbdb py-autopep8 flycheck rx subr-x dash yasnippet
highlight-indentation flymake company elpy pyvenv elpy-profile
elpy-django s elpy-refactor python tramp-sh tramp tramp-compat
tramp-loaddefs trampver shell pcomplete format-spec grep compile files-x
etags xref project cus-edit cus-start cus-load wid-edit linum
material-theme ein-notebook eieio-opt speedbar sb-image ezimage dframe
find-func ein-inspector ein-traceback ein-pytools ein-pager
ein-completer ein-subpackages ein-notification ein-scratchsheet
ein-worksheet advice ein-kill-ring ein-cell-output ein-cell-edit
ein-cell ein-output-area xml comint ring ein-kernelinfo ein-kernel
ein-ipdb ein-events eieio-compat ein-websocket websocket bindat
ansi-color ein-contents-api ein-query request mail-utils url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse auth-source cl-seq eieio eieio-core cl-macs gnus-util
mm-util help-fns mail-prsvr password-cache url-vars mailcap cl ein-node
ein-log ein-core ein-utils json map cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ewoc ein-loaddefs
ein finder-inf paren edmacro kmacro saveplace ido info package
epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode
easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
ns-win ucs-normalize term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame 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 charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer 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 kqueue cocoa ns multi-tty
make-network-process emacs)
Memory information:
((conses 16 425471 23113)
(symbols 48 40207 0)
(miscs 40 902 1134)
(strings 32 85244 13367)
(string-bytes 1 2542596)
(vectors 16 61153)
(vector-slots 8 1064764 7383)
(floats 8 1067 542)
(intervals 56 2595 465)
(buffers 976 98))
[-- Attachment #2: Type: text/html, Size: 6816 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#26326: 25.1; "import codecs, os; ..." Weird output in python shell Mac OS X
2017-03-31 19:14 bug#26326: 25.1; "import codecs, os; ..." Weird output in python shell Mac OS X Monib Ahmed
@ 2017-03-31 19:53 ` Noam Postavsky
0 siblings, 0 replies; 2+ messages in thread
From: Noam Postavsky @ 2017-03-31 19:53 UTC (permalink / raw)
To: Monib Ahmed; +Cc: 26326
merge 25753 26326
quit
On Fri, Mar 31, 2017 at 3:14 PM, Monib Ahmed <MonibAhmed@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-31 19:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-31 19:14 bug#26326: 25.1; "import codecs, os; ..." Weird output in python shell Mac OS X Monib Ahmed
2017-03-31 19:53 ` Noam Postavsky
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).