modeEnter
normal-mode is an interactive compiled Lisp function in `files.el'.

(normal-mode &optional find-file)

Choose the major mode for this buffer automatically.
Also sets up any specified local variables of the file.
Uses the visited file name, the -*- line, and the local variables spec.

This function is called automatically from `find-file'.  In that case,
we may set up the file-specified mode and local variables,
depending on the value of `enable-local-variables'.
In addition, if `local-enable-local-variables' is nil, we do
not set local variables (though we do notice a mode specified with -*-.)

`enable-local-variables' is ignored if you run `normal-mode' interactively,
or from Lisp without specifying the optional argument find-file;
in that case, this function acts as if `enable-local-variables' were t.

That will only work, though, if there are some hints in the buffer (e.g. #!/bin/python at the top of the file) or the file name that the buffer is backed by (if any) has a python extension (and there are other ways, too; see the definition above and for set-auto-mode for more information on what they all are).
You can also set the mode specifically, if you know what mode it is you want.  I have this in my.emacs:
;;;; ------------------------------------------------------------------------
;;;; --- F3 - multi-purpose prefix keymap
;;;; ------------------------------------------------------------------------
(setq my-F3-keymap (make-sparse-keymap))
(global-set-key [(f3)] my-F3-keymap)


;; --- m -- generic (major) modes ---
(require 'generic)
(require 'generic-x)

;; stolen shamelessly from generic-x Samba mode
(define-generic-mode 'generic-rc-mode
   (list?#)
   nil
   '(
     ("^\\s-*\\(.+\\)=\\([^\r\n]*\\)"
      (1 'font-lock-variable-name-face)
      (2 'font-lock-type-face))
     )
   (list "\\(/\\.[^/]+rc$\\|\\.rc$\\)" "weblogic[^/\\]*\\.conf\\'" "oc4j[^/\\]*\\.conf\\'" "tomcat[^/\\]*\\.conf\\'")
   nil
   "Generic RC mode.")

(setq my-F3:m-keymap (make-sparse-keymap))
(define-key my-F3-keymap [(m)] my-F3:m-keymap)
 (define-key my-F3:m-keymap [(a)] 'apache-conf-generic-mode)
 (define-key my-F3:m-keymap [(b)] 'bat-generic-mode)
 (define-key my-F3:m-keymap [(f)] 'fundamental-mode)
 (define-key my-F3:m-keymap [(i)] 'ini-generic-mode)
 (define-key my-F3:m-keymap [(j)] 'javascript-generic-mode)
 (define-key my-F3:m-keymap [(J)] 'java-properties-generic-mode)
 (define-key my-F3:m-keymap [(l)] 'emacs-lisp-mode)
  (define-key my-F3:m-keymap [(L)] 'lisp-interaction-mode)
 (define-key my-F3:m-keymap [(n)] 'nxml-mode)
 (define-key my-F3:m-keymap [(p)] 'cperl-mode)
 (define-key my-F3:m-keymap [(r)] 'generic-rc-mode)
 (define-key my-F3:m-keymap [(s)]'sgml-mode)
 (define-key my-F3:m-keymap [(S)]'shell-script-mode)
 (define-key my-F3:m-keymap [(t)] 'text-mode)

;; --- M -- generic (minor) modes ---
(setq my-F3:M-keymap (make-sparse-keymap))
(define-key my-F3-keymap [(M)] my-F3:M-keymap)
 (define-key my-F3:M-keymap [(l)] 'longlines-mode)
 (define-key my-F3:M-keymap [(v)] 'view-mode)
 (define-key my-F3:M-keymap [(V)] 'visible-whitespace-mode)

With it I can set my major mode to CPerl with a minor-mode of View Mode by doing: F3mpF3Mv

A: Hm, that wasn't such a simple answer above.
A simpler answer is: Emacs only learned how to recognize Python files in version 22.1 (June 2007).  If you're using an older emacs, that would explain it.  With the newer versions, it should Just Work, at least if the file's name ends with ".py".
It is **a lot** less difficult than I was led to believe. Everyone always says how hard it is and how the cravings are insane and how you need to take pills and wear a patch and chew gum yada  yada yada. 

I smoked for 42 years. I didn't want to die. I stopped cold turkey. I steeled myself for how awful it was going to be. Guess what: it was so *not traumatic* that I was pissed off at myself for not having done it decades ago, because I believed the hype. If you can get beyond day 3, you've broken your addiction. After two weeks, it's all over. You respond to your cravings by not giving in to them. Ever.

I'm not special. I don't have anything in me that you don't have in yourself. If I can quit, it's only logical to say that you can do it, too. It's doable. So just do it, and get it over with. It's not heroin.  It's one of the very few dangerous, addictive substances you can just stop taking and nothng happens to you beyond cessation of addiction. Wouldn't you like to be free of that? You can.

The new you that does not smoke is a mindset that you grow into.  You can smell it from 100 feet.

Best of luck to you. It's not a horrible ordeal, done once. But just be warned, if you backslide into it, you'll have to go through it all over again, and it isn't any easier the next time.North Star High School selected its students of the month for October. They are Marshall Fetsko, Keith Berkebile, Hunter Stevens, Emily Musselman, Cara Augustine, Mattison Lyons, Faith Pelesky and Nathan Rininger.
Fetsko is the son of Mike and Heather Fetsko, Hooversville. He is a 10th-grade honors student. He is on the rifle and quiz teams.
Berkebile is the son of Chad and Lara Berkebile, Hooversville. He is an 11th-grade college prep student who plays baseball.
Stevens is the son of Richard Stevens, Jennerstown, and Melinda Brant, Stoystown. He is a ninth-grade academic student who plays football and baseball.
Musselman is the daughter of Jessica Musselman, Acosta. She is a ninth-grade honors student. She participates in the chorus, school musical and pep club.
Augustine is the daughter of John and Rhonda Augustine, Boswell. She is a 10th-grade honors student. She plays volleyball and is in the musical.
Lyons is the daughter of Kimberly Lyons, Boswell. She is an 11th-grade honors student. She is a member of the newspaper staff/designer, Scholastic Quiz Team, art club and Spanish club.
Pelesky is the daughter of Dave and Tina Pelesky, Boswell. She is a 12th-grade honors/dual enrollment student. She participates in student council, Key Club, chorus, musical and art club.
Rininger is the son of LeeAnn and Barry Rininger, Stoystown. He is a 12th-grade honors student. He is on the rifle and soccer teams and in the musical.The existence of the list was revealed by freelance journalist Mustafa Can. He claims that Bard, former member of the band Army of Lovers, encourages Elit members to reveal where the best drugs are available, who has slept with whom, who has snorted the most cocaine at celebrity parties and other scandals.
Well-known names on the list include TV presenter Adam Alsing, comedian Mikael Tornvig and political commentator Stig-Björn Lundgren.
 This came after K