Emacs Inferior Python shell shows the send message with each python-shell-send-region commandEmacs: Inferior-mode python-shell appears “lagged”Emacs Shell mode: how to send region to shell?Emacs Python-inferior shell not showing prompt after matplotlib show() commandHow to enable automatic indentation in python.el from fgallinaPython exit commands - why so many and when should each be used?How do I get tab completion in ipython in emacs?Emacs OS X: inferior shell $PATH inheritanceemacs 24.5 python-mode (stock version Vs 6.2.1)Ipython in emacs dumps trash text into shellSpecify python-mode.el's python executable

Why is DC so, so, so Democratic?

Pass USB 3.0 connection through D-SUB connector

Why does the salt in the oceans not sink to the bottom?

Reissue stolen passports having US, UK, Canada visas

Why are Oscar, India, and X-Ray (O, I, and X) not used as taxiway identifiers?

Question about differential signals as input of an operational amplifier

Can the caster of Time Stop still use their bonus action or reaction?

Can a creature sustain itself by eating its own severed body parts?

Did Don Young threaten John Boehner with a 10 inch blade to the throat?

What should I watch before playing Alien: Isolation?

What is the metal bit in the front of this propeller spinner?

How to use AppendTo in a While loop?

French equivalents of "some people", as in "Honestly, some people!"

What kind of curve (or model) should I fit to my percentage data?

Is it better to have a 10 year gap or a bad reference?

1025th term of the given sequence.

Calculating Fibonacci sequence in several different ways

Cargo capacity of a kayak

Can't call helper function from helper inside list forEach

How did pilots avoid thunderstorms and related weather before “reliable” airborne weather radar was introduced on airliners?

Can a ring have no zero divisors while being non-commutative and having no unity?

Why do we need an estimator to be consistent?

Book in which the "mountain" in the distance was a hole in the flat world

Can a warlock shoot multiple beams from the Eldritch Blast cantrip with only a single free hand?



Emacs Inferior Python shell shows the send message with each python-shell-send-region command


Emacs: Inferior-mode python-shell appears “lagged”Emacs Shell mode: how to send region to shell?Emacs Python-inferior shell not showing prompt after matplotlib show() commandHow to enable automatic indentation in python.el from fgallinaPython exit commands - why so many and when should each be used?How do I get tab completion in ipython in emacs?Emacs OS X: inferior shell $PATH inheritanceemacs 24.5 python-mode (stock version Vs 6.2.1)Ipython in emacs dumps trash text into shellSpecify python-mode.el's python executable






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








14















I am using the Python inferior shell on OS X (El Capitan) and every time I send a piece of code to the Python process (using C-c C-r which is bound to python-shell-send-region) I get a message like this in the Python shell:



>>> import codecs, os;
__pyfile = codecs.open('''/var/folders/6j/g9hcs1s17g1dgxr3p_m04rq80000gn/T/py5013kfY''', encoding='''utf-8''');
__code = __pyfile.read().encode('''utf-8''');
__pyfile.close();
os.remove('''/var/folders/6j/g9hcs1s17g1dgxr3p_m04rq80000gn/T/py5013kfY''');
exec(compile(__code, '''/Users/user/Desktop/sample.py''', 'exec'));


I would like to not have this message shown with each invocation of the command. The same version of Emacs on Linux (together with python.el file) does not have this problem. The template of the message is defined in python-shell-send-file function (in python.el file), which in itself is puzzling as I cannot see how this function is called when I invoke python-shell-send-region. For the first run I invoke the Python interpreter (version 2.7.10) with the following command





/usr/bin/python -i


but it also behaves the same with other python interpreters (installed via brew). I am using Emacs 24.5.1 (again installed via brew). The only python-mode specific configuration I use in .emacs are related to the tab width:



(add-hook 'python-mode-hook
(lambda ()
(setq indent-tabs-mode t)
(setq tab-width 2)
(setq python-indent 2)))


Any help or suggestion is appreciated.



Edit and a possible solution:



(I found this in this page https://github.com/jorgenschaefer/elpy/issues/1307):



$ easy_install-3.6 gnureadline
$ cd /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
$ mv readline.cpython-36m-darwin.so readline.cpython-36m-darwin.so.bak


If you get an error while installing gnureadline, fatal error: 'stdio.h' file not found, try xcode-select --install.










share|improve this question
























  • I have found a workaround for this annoyance. ipython seems to not have the same issue for me. You can set the python-shell-interpreter to ipython (something like this in your .emacs): (setq python-shell-interpreter "ipython2")

    – s.yadegari
    Dec 15 '16 at 11:38












  • That solution(issues/1307) works for me either with slight changes. easy_install-3.6 => pip3 install 3.6 => 3.7 36m => 37m

    – David Jung
    Jul 19 '18 at 8:05


















14















I am using the Python inferior shell on OS X (El Capitan) and every time I send a piece of code to the Python process (using C-c C-r which is bound to python-shell-send-region) I get a message like this in the Python shell:



>>> import codecs, os;
__pyfile = codecs.open('''/var/folders/6j/g9hcs1s17g1dgxr3p_m04rq80000gn/T/py5013kfY''', encoding='''utf-8''');
__code = __pyfile.read().encode('''utf-8''');
__pyfile.close();
os.remove('''/var/folders/6j/g9hcs1s17g1dgxr3p_m04rq80000gn/T/py5013kfY''');
exec(compile(__code, '''/Users/user/Desktop/sample.py''', 'exec'));


I would like to not have this message shown with each invocation of the command. The same version of Emacs on Linux (together with python.el file) does not have this problem. The template of the message is defined in python-shell-send-file function (in python.el file), which in itself is puzzling as I cannot see how this function is called when I invoke python-shell-send-region. For the first run I invoke the Python interpreter (version 2.7.10) with the following command





/usr/bin/python -i


but it also behaves the same with other python interpreters (installed via brew). I am using Emacs 24.5.1 (again installed via brew). The only python-mode specific configuration I use in .emacs are related to the tab width:



(add-hook 'python-mode-hook
(lambda ()
(setq indent-tabs-mode t)
(setq tab-width 2)
(setq python-indent 2)))


Any help or suggestion is appreciated.



Edit and a possible solution:



(I found this in this page https://github.com/jorgenschaefer/elpy/issues/1307):



$ easy_install-3.6 gnureadline
$ cd /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
$ mv readline.cpython-36m-darwin.so readline.cpython-36m-darwin.so.bak


If you get an error while installing gnureadline, fatal error: 'stdio.h' file not found, try xcode-select --install.










share|improve this question
























  • I have found a workaround for this annoyance. ipython seems to not have the same issue for me. You can set the python-shell-interpreter to ipython (something like this in your .emacs): (setq python-shell-interpreter "ipython2")

    – s.yadegari
    Dec 15 '16 at 11:38












  • That solution(issues/1307) works for me either with slight changes. easy_install-3.6 => pip3 install 3.6 => 3.7 36m => 37m

    – David Jung
    Jul 19 '18 at 8:05














14












14








14


3






I am using the Python inferior shell on OS X (El Capitan) and every time I send a piece of code to the Python process (using C-c C-r which is bound to python-shell-send-region) I get a message like this in the Python shell:



>>> import codecs, os;
__pyfile = codecs.open('''/var/folders/6j/g9hcs1s17g1dgxr3p_m04rq80000gn/T/py5013kfY''', encoding='''utf-8''');
__code = __pyfile.read().encode('''utf-8''');
__pyfile.close();
os.remove('''/var/folders/6j/g9hcs1s17g1dgxr3p_m04rq80000gn/T/py5013kfY''');
exec(compile(__code, '''/Users/user/Desktop/sample.py''', 'exec'));


I would like to not have this message shown with each invocation of the command. The same version of Emacs on Linux (together with python.el file) does not have this problem. The template of the message is defined in python-shell-send-file function (in python.el file), which in itself is puzzling as I cannot see how this function is called when I invoke python-shell-send-region. For the first run I invoke the Python interpreter (version 2.7.10) with the following command





/usr/bin/python -i


but it also behaves the same with other python interpreters (installed via brew). I am using Emacs 24.5.1 (again installed via brew). The only python-mode specific configuration I use in .emacs are related to the tab width:



(add-hook 'python-mode-hook
(lambda ()
(setq indent-tabs-mode t)
(setq tab-width 2)
(setq python-indent 2)))


Any help or suggestion is appreciated.



Edit and a possible solution:



(I found this in this page https://github.com/jorgenschaefer/elpy/issues/1307):



$ easy_install-3.6 gnureadline
$ cd /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
$ mv readline.cpython-36m-darwin.so readline.cpython-36m-darwin.so.bak


If you get an error while installing gnureadline, fatal error: 'stdio.h' file not found, try xcode-select --install.










share|improve this question
















I am using the Python inferior shell on OS X (El Capitan) and every time I send a piece of code to the Python process (using C-c C-r which is bound to python-shell-send-region) I get a message like this in the Python shell:



>>> import codecs, os;
__pyfile = codecs.open('''/var/folders/6j/g9hcs1s17g1dgxr3p_m04rq80000gn/T/py5013kfY''', encoding='''utf-8''');
__code = __pyfile.read().encode('''utf-8''');
__pyfile.close();
os.remove('''/var/folders/6j/g9hcs1s17g1dgxr3p_m04rq80000gn/T/py5013kfY''');
exec(compile(__code, '''/Users/user/Desktop/sample.py''', 'exec'));


I would like to not have this message shown with each invocation of the command. The same version of Emacs on Linux (together with python.el file) does not have this problem. The template of the message is defined in python-shell-send-file function (in python.el file), which in itself is puzzling as I cannot see how this function is called when I invoke python-shell-send-region. For the first run I invoke the Python interpreter (version 2.7.10) with the following command





/usr/bin/python -i


but it also behaves the same with other python interpreters (installed via brew). I am using Emacs 24.5.1 (again installed via brew). The only python-mode specific configuration I use in .emacs are related to the tab width:



(add-hook 'python-mode-hook
(lambda ()
(setq indent-tabs-mode t)
(setq tab-width 2)
(setq python-indent 2)))


Any help or suggestion is appreciated.



Edit and a possible solution:



(I found this in this page https://github.com/jorgenschaefer/elpy/issues/1307):



$ easy_install-3.6 gnureadline
$ cd /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
$ mv readline.cpython-36m-darwin.so readline.cpython-36m-darwin.so.bak


If you get an error while installing gnureadline, fatal error: 'stdio.h' file not found, try xcode-select --install.







python macos emacs python.el comint-mode






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 12:47







s.yadegari

















asked Nov 15 '15 at 23:14









s.yadegaris.yadegari

1201 silver badge7 bronze badges




1201 silver badge7 bronze badges












  • I have found a workaround for this annoyance. ipython seems to not have the same issue for me. You can set the python-shell-interpreter to ipython (something like this in your .emacs): (setq python-shell-interpreter "ipython2")

    – s.yadegari
    Dec 15 '16 at 11:38












  • That solution(issues/1307) works for me either with slight changes. easy_install-3.6 => pip3 install 3.6 => 3.7 36m => 37m

    – David Jung
    Jul 19 '18 at 8:05


















  • I have found a workaround for this annoyance. ipython seems to not have the same issue for me. You can set the python-shell-interpreter to ipython (something like this in your .emacs): (setq python-shell-interpreter "ipython2")

    – s.yadegari
    Dec 15 '16 at 11:38












  • That solution(issues/1307) works for me either with slight changes. easy_install-3.6 => pip3 install 3.6 => 3.7 36m => 37m

    – David Jung
    Jul 19 '18 at 8:05

















I have found a workaround for this annoyance. ipython seems to not have the same issue for me. You can set the python-shell-interpreter to ipython (something like this in your .emacs): (setq python-shell-interpreter "ipython2")

– s.yadegari
Dec 15 '16 at 11:38






I have found a workaround for this annoyance. ipython seems to not have the same issue for me. You can set the python-shell-interpreter to ipython (something like this in your .emacs): (setq python-shell-interpreter "ipython2")

– s.yadegari
Dec 15 '16 at 11:38














That solution(issues/1307) works for me either with slight changes. easy_install-3.6 => pip3 install 3.6 => 3.7 36m => 37m

– David Jung
Jul 19 '18 at 8:05






That solution(issues/1307) works for me either with slight changes. easy_install-3.6 => pip3 install 3.6 => 3.7 36m => 37m

– David Jung
Jul 19 '18 at 8:05













0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f33726268%2femacs-inferior-python-shell-shows-the-send-message-with-each-python-shell-send-r%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid …


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f33726268%2femacs-inferior-python-shell-shows-the-send-message-with-each-python-shell-send-r%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?