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

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript