Important: First, check to see whether the Python language is already installed on your machine. (This will probably be the case, for example, if you have a Thinkpad running windows.) If Python is already installed, then do not follow these instructions. Instead, see the course staff, so we can help you install things without messing up your current system. If Python isn't installed on your machine, then follow the instructions on this page.
>>>
)
>>> 2**10
;;python (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist)) (setq interpreter-mode-alist (cons '("python" . python-mode) interpreter-mode-alist)) (autoload 'python-mode "python-mode" "Python editing mode." t) (global-font-lock-mode t) (font-lock-mode +1)
In the "Options" drop-down menu in emacs, click on save options and note where emacs saves the file. Go to that directory and edit the created .emacs file to include the text lines above using Wordpad. Cut and paste the text to replace the text in that .emacs file.
This file can be used to customize all sorts of Emacs behaviors. For now, it just tells Emacs to start Python editing mode when visiting file whose name ends in .py, and also has Emacs use different colors to signal Python keywords and other syntactic conventions. Ask an Emacs user about other useful things you might put in this file.