Mercurial > emacs
comparison lisp/progmodes/python.el @ 97689:5f56382dc026
(run-python): Remove '' from sys.path.
author | Romain Francoise <romain@orebokech.com> |
---|---|
date | Sun, 24 Aug 2008 19:47:07 +0000 |
parents | 464e6f78f756 |
children | 9f4cc3f73286 |
comparison
equal
deleted
inserted
replaced
97688:fea1fc8fb2e8 | 97689:5f56382dc026 |
---|---|
1545 ;; Fixme: Consider making `python-buffer' buffer-local as a buffer | 1545 ;; Fixme: Consider making `python-buffer' buffer-local as a buffer |
1546 ;; (not a name) in Python buffers from which `run-python' &c is | 1546 ;; (not a name) in Python buffers from which `run-python' &c is |
1547 ;; invoked. Would support multiple processes better. | 1547 ;; invoked. Would support multiple processes better. |
1548 (when (or new (not (comint-check-proc python-buffer))) | 1548 (when (or new (not (comint-check-proc python-buffer))) |
1549 (with-current-buffer | 1549 (with-current-buffer |
1550 (let* ((cmdlist (append (python-args-to-list cmd) '("-i"))) | 1550 (let* ((cmdlist |
1551 (append (python-args-to-list cmd) | |
1552 '("-i" "-c" "import sys; sys.path.remove('')"))) | |
1551 (path (getenv "PYTHONPATH")) | 1553 (path (getenv "PYTHONPATH")) |
1552 (process-environment ; to import emacs.py | 1554 (process-environment ; to import emacs.py |
1553 (cons (concat "PYTHONPATH=" | 1555 (cons (concat "PYTHONPATH=" |
1554 (if path (concat path path-separator)) | 1556 (if path (concat path path-separator)) |
1555 data-directory) | 1557 data-directory) |