1

When I call run-python, I get the buffer with python REPL and the prompt.

  • I can type stuff, but when I press enter there is no reaction (except the cursor moves in new line).
  • If I press C-c C-c (comint-interrupt-subjob), I get a new prompt, but I don't see any output of the previous commands.
  • If I use python-shell-send-region or if I evaluate (comint-send-string "Python" "print 5\n"), I don't see any output in Python buffer, but the elisp function returns without error.
  • I can end the python process by pressing C-d (comint-delchar-or-maybe-eof).

The same problem occurs both with python and ipython (I tried python-shell-switch-to-shell with both). The Emacs communication also doesn't work when trying to use Mozart programming system, which also uses comint. Some other comint based modes on the other hand (scheme, shell) work without problems.

If I run python inside emacs shell I get the same behavior as above. After C-d, the python ends and the shell works normally again.

I've also tried starting emacs without init files.

Versions:

  • Python 2.7.8
  • Emacs 24.3.1 (also saw the problem with 24.4.1)
  • built-in python.el
  • Debian Jessie
  • Have you looked into elpy. I use that for python development in emacs and everything works quite well. I don't have any experience w/ pure python-mode. – mankoff Nov 17 '14 at 19:06
  • No, so far it seems that python.el has more or less what I need. Has elpy any fundamental advantages? – Matej Fröbe Nov 17 '14 at 19:38
  • @MatejFröbe elpy primarily does a bunch of helpful configuration for you to get common python issues smoothed out. Things like autocomplete, pep8 / flakes, testing, etc. all work reasonably well out of the box. It also has integration with pyvenv that might help with your python repl issue. – elarson Nov 17 '14 at 21:27
  • @elarson I mostly need good integration with IPyhon, a debugger which shows me the current location in file and the ability to jump to the file and line of failed unit test. All of these normally work reasonably well out of the box with python.el. It works for me on Windows and in virtual machine with fresh install of Debian Jessie, but it is broken on one particualar machine and I'm running out of ideas how to debug it with reasonable amount of effort. But thanks for the suggestion anyway, I might look at elpy if I have bigger needs in the future. – Matej Fröbe Nov 18 '14 at 10:09
  • @MatejFröbe I gave ipython a try and I didn't see it provide links to files in tracebacks. That said, pytest.el (which I wrote) as well as elpy's test running functionality can run a test in a compilation buffer where you can easily hop between files in a traceback. – elarson Nov 18 '14 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.