Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does the python interpreter not print input code and output in emacs python shell buffer for python-mode?
    primarykey
    data
    text
    <p>My current python setup in emacs is:</p> <pre><code>(setq py-shell-name "ipython") ;; sudo pip install ipython (setq py-shell-name "/usr/local/bin/ipython") (setq py-force-py-shell-name-p t) (add-to-list 'load-path "~/.emacs.d/python-mode.el-6.1.0/") (setq py-install-directory "~/.emacs.d/python-mode.el-6.1.0/") (require 'python-mode) (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) (add-to-list 'interpreter-mode-alist '("python" . python-mode)) </code></pre> <p>In a python file, I start the python interpreter with "C-c !" (py-shell). I evaluate region of codes with "C-c |" (py-execute-region).</p> <p>If I execute each of the following line individually,</p> <pre><code>x = "hello world" x print(x) </code></pre> <p>I get the following in the python shell buffer:</p> <pre><code>Python 2.7.2 (default, Jun 20 2012, 16:23:33) Type "copyright", "credits" or "license" for more information. IPython 0.13.1 -- An enhanced Interactive Python. ? -&gt; Introduction and overview of IPython's features. %quickref -&gt; Quick reference. help -&gt; Python's own help system. object? -&gt; Details about 'object', use 'object??' for extra details. In [1]: In [5]: In [6]: hello world In [7]: </code></pre> <p>If I use the default python interpreter, I get</p> <pre><code>Python 2.7.2 (default, Jun 20 2012, 16:23:33) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; &gt;&gt;&gt; &gt;&gt;&gt; hello world &gt;&gt;&gt; </code></pre> <p>Questions:</p> <ol> <li><p>Are these behaviour correct (not showing which code is being evaluated, and not showing what a python interpreter would normally print)?</p></li> <li><p>How do I set it so that the python shell prints output like a normal python interpreter in the terminal? (with input code and output printed)</p></li> </ol> <p>I guess I'm used to ESS for R. Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload