Thursday, April 28, 2011

Executing current Python script in Emacs on Windows

I've just started learning Emacs, and decided to start writing Python in it. I tried using C-c C-c to execute the current buffer, but I get the message Searching for program: no such file or directory, python.

I've looked on google, but I'm none the wiser as to how to sort this out (bear in mind I know next to nothing about Emacs!)

From stackoverflow
  • I managed to work it out, following the instructions here. I used python-mode.el, when before I had been using Emacs' built-in python.el, but according to emacswiki, "The version in Emacs 22 has a bunch of problems". Hope someone else running Emacs 22 on Windows XP finds this useful one day!

  • Try adding C:\Python26 (or whatever Python you have installed) to the PATH environment variable.

    I find python-mode and yasnippet to be useful for writing Python in emacs.

    Skilldrick : Yes, that helps as well! Thanks.

0 comments:

Post a Comment