Hello,

I'm sending this this tiny patch to python-mode.el so that py-shell supports file completion after hiting the TAB key (and M-TAB lists possible completions):

--------------------- cut here ----------------------------
--- python-mode.el.orig 2008-04-29 16:42:04.000000000 +0100
+++ python-mode.el      2008-04-29 16:46:08.000000000 +0100
@@ -708,9 +708,10 @@
 (if py-shell-map
     nil
   (setq py-shell-map (copy-keymap comint-mode-map))
-  (define-key py-shell-map [tab]   'tab-to-tab-stop)
   (define-key py-shell-map "\C-c-" 'py-up-exception)
   (define-key py-shell-map "\C-c=" 'py-down-exception)
+  (define-key py-shell-map "\t"    'comint-dynamic-complete-filename)
+ (define-key py-shell-map "\e\t" 'comint-dynamic-list-filename- completions)
   )

 (defvar py-mode-syntax-table nil
--------------------- cut here ----------------------------

Cheers,

Rodrigo Ventura
Institute for Systems and Robotics
(www.isr.ist.utl.pt)
Instituto Superior Técnico
Lisbon, Portugal


_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to