changeset 97689:5f56382dc026

(run-python): Remove '' from sys.path.
author Romain Francoise <romain@orebokech.com>
date Sun, 24 Aug 2008 19:47:07 +0000
parents fea1fc8fb2e8
children af1ed0096327
files lisp/ChangeLog lisp/progmodes/python.el
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Aug 24 19:06:36 2008 +0000
+++ b/lisp/ChangeLog	Sun Aug 24 19:47:07 2008 +0000
@@ -1,3 +1,7 @@
+2008-08-24  Romain Francoise  <romain@orebokech.com>
+
+	* progmodes/python.el (run-python): Remove '' from sys.path.
+
 2008-08-23  Glenn Morris  <rgm@gnu.org>
 
 	* progmodes/fortran.el (fortran-tab-mode-string)
--- a/lisp/progmodes/python.el	Sun Aug 24 19:06:36 2008 +0000
+++ b/lisp/progmodes/python.el	Sun Aug 24 19:47:07 2008 +0000
@@ -1547,7 +1547,9 @@
   ;; invoked.  Would support multiple processes better.
   (when (or new (not (comint-check-proc python-buffer)))
     (with-current-buffer
-	(let* ((cmdlist (append (python-args-to-list cmd) '("-i")))
+	(let* ((cmdlist
+		(append (python-args-to-list cmd)
+			'("-i" "-c" "import sys; sys.path.remove('')")))
 	       (path (getenv "PYTHONPATH"))
 	       (process-environment	; to import emacs.py
 		(cons (concat "PYTHONPATH="