Skip to content

Commit

Permalink
Merge pull request #1235 from galaunay/Add-projet-root-to-sys-path
Browse files Browse the repository at this point in the history
Add project root to shell path
  • Loading branch information
galaunay committed Dec 7, 2017
2 parents 2630103 + 3fc8d7d commit 1f3a9a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions elpy-shell.el
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ Python process. This allows the process to start up."
(run-python (python-shell-parse-command) t t))
(when sit
(sit-for sit))
(when (elpy-project-root)
(python-shell-send-string
(format "import sys;sys.path.append('%s')" (elpy-project-root))))
(get-buffer-process dedbufname))
(if dedproc
dedproc
Expand All @@ -347,6 +350,9 @@ Python process. This allows the process to start up."
(run-python (python-shell-parse-command) nil t))
(when sit
(sit-for sit))
(when (elpy-project-root)
(python-shell-send-string
(format "import sys;sys.path.append('%s')" (elpy-project-root))))
(get-buffer-process bufname))))))

(defun elpy-shell--ensure-shell-running ()
Expand Down

0 comments on commit 1f3a9a1

Please sign in to comment.