Search code examples
pythonemacswindows-xpemacsw32

Python with emacs and windows XP


I am trying to set up Python under emacs on my company's computer which runs windows XP (64bits).

I tried both python.el and python-mode.el without success.

My current problem is that whenever I use something like C-c C-c to send a .pybuffer to the python process, I get the following error message

apply: Searching for program: no such file or directory, python

A *Python* buffer is created but it as no prompt and I don't know how to interact with it. Pressing RET inside the said buffer raises the following error message

comint-send-string: Output file descriptor of Python is closed

which I fail to interpret.

Python seems to be correctly installed (and added to search path) because M-x shell RET python -i RET correctly begins a Python shell with the >>> prompt.

Do you have any idea about what is wrong with my setup?


Solution

  • What is the value of a variable python-command ?

    You can debug run-python function which is defined in python.el. This function creates the internal python process.

    Just put a cursor inside the function and execute M-x edebug-defun. You can read more about debugging in the doc.