Emacs and Python

How do I actually take advantage of Emacs as a Python IDE?  A quick google search turned up this:  Enigma Curry blog post. This post is somewhat beyond me, and makes me a bit scared to try to configure my Emacs to to work with Python.  But I now feel like doing anything else would be wimpy.  I guess there’s also IDLE, which provides a GUI for Python development – and it’s a standard part of the Python system.  But Emacs is cooler, right?

It turns out that if I want to customize Emacs for Python, I’m going to have to find and edit a file called .emacs.  It says that this file should be in the $home_directory, along with a directory called .emacs.d.  I found the .emacs.d directory, but not the .emacs file.  I am missing something obvious, still unsure what I’m doing wrong.

Okay, I just created a .emacs file from one I found online – and I now have a working .emacs file.  The one I’ve got right now has a black background and a different font.  Now to make it do Python stuff.  I’m following a tutorial that can be found here (Setup Perfect Python Environment – Sunshine and Rain of a Developer).  I’m starting off by downloading several packages: python-mode.el , pymacs0.24 , auto-complete.el,  yasnippet.el, rope and  ropemacs.

Later the same night…  I have finally got my very first emacs configuration file.  Here it is (.emacs):

(add-to-list 'load-path "~/.emacs.d/")
(add-to-list 'load-path "~/.emacs.d/plugins")
(require 'auto-complete)
(global-auto-complete-mode t)
(require 'yasnippet-bundle)
(load-library "init_python")

I had to do the whole thing twice too, because I messed up somewhere along the way, and nothing was working at all.  But honestly, I don’t fully know what all this is going to do for me in the end.  Hopefully make my life easier!

Oh, one more note – I had to install Pymacs along the way.  At least, I had a problem, thought installing Pymacs would fix it, installed Pymacs, and it may or may not have fixed the original problem.

Leave a Reply

Your email address will not be published. Required fields are marked *