What is happening:
>>> 2 * 10
2 * 10
20
>>>
What I want to happen:
>>> 2 * 10
20
>>>
Does anyone know why the command is printed out before being executed and how to stop it from doing that? I can't find any documentation about this. I'm using Emacs 23 on Mac OS X with Python 2.7.
So, we need to add some commands to this file for Emacs to be used for Python Development. Firstly, open Emacs and hit Ctrl + X, followed by Ctrl + F and then enter ~/.emacs to open the init file. Next, add the following lines of code to your init file:
The Python pstats module provides an interactive tool when a script from a regular shell in Emacs; it can also be used in a Python shell running in Emacs. You can open an interactive Python shell with ‘run-python’ (“C-c C-p”), and send code for execution by the shell process using the ‘python-shell-send-*’ functions.
The elpy (Emacs Lisp Python Environment) package provides us with a near complete set of Python IDE features, including: Automatic Indentation, Syntax Highlighting, Auto-Completion, Syntax Checking, Python REPL Integration, Virtual Environment Support, and Much more!
In this special case the ( and the [ that follow join are adjacent, so I would break the line after [. (In the more typical case, I would break the line at the first ( or [ character.) This seems to me like something that emacs could do, and probably does (somewhere), and it would save me a whole lotta keystrokes.
I don't use python, but I would guess that the python feature you are using has set the variable comint-process-echoes
incorrectly. Whatever the value in your buffer is, just reverse the boolean value.
Comint is a support library in Emacs for running inferior processes in Emacs. It interacts with the prompts, and the python shell (or M-x shell) needs to be told about the echo feature.
In your shell buffer with the problem, do:
M-: (setq comint-process-echoes t) ;; or nil
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With