diff options
| author | Fabián Ezequiel Gallina | 2012-05-17 00:03:32 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2012-05-17 00:03:32 -0300 |
| commit | a1ea6ab81c362ada4899b59dbac3df0af27aa77f (patch) | |
| tree | 44b6ad2acfdece73d873693e8f3e210d95ec699e | |
| parent | 722c985bb0553b4036bff2ec7227492524320425 (diff) | |
| download | emacs-a1ea6ab81c362ada4899b59dbac3df0af27aa77f.tar.gz emacs-a1ea6ab81c362ada4899b59dbac3df0af27aa77f.zip | |
Enhanced shell setup for Windows.
Also added documentation explaining how to spawn the iPython process
on Windows.
| -rw-r--r-- | lisp/progmodes/python.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 9e83ac77f6b..fe39ff1c4c3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -90,6 +90,18 @@ | |||
| 90 | ;; (setq python-shell-completion-string-code | 90 | ;; (setq python-shell-completion-string-code |
| 91 | ;; "';'.join(__IP.complete('''%s'''))\n") | 91 | ;; "';'.join(__IP.complete('''%s'''))\n") |
| 92 | 92 | ||
| 93 | ;; Unfortunately running iPython on Windows needs some more tweaking. | ||
| 94 | ;; The way you must set `python-shell-interpreter' and | ||
| 95 | ;; `python-shell-interpreter-args' is as follows: | ||
| 96 | |||
| 97 | ;; (setq | ||
| 98 | ;; python-shell-interpreter "C:\\Python27\\python.exe" | ||
| 99 | ;; python-shell-interpreter-args | ||
| 100 | ;; "-i C:\\Python27\\Scripts\\ipython-script.py") | ||
| 101 | |||
| 102 | ;; That will spawn the iPython process correctly (Of course you need | ||
| 103 | ;; to modify the paths according to your system). | ||
| 104 | |||
| 93 | ;; Please note that the default completion system depends on the | 105 | ;; Please note that the default completion system depends on the |
| 94 | ;; readline module, so if you are using some Operating System that | 106 | ;; readline module, so if you are using some Operating System that |
| 95 | ;; bundles Python without it (like Windows) just install the | 107 | ;; bundles Python without it (like Windows) just install the |
| @@ -1565,7 +1577,7 @@ This function takes the list of setup code to send from the | |||
| 1565 | (dolist (code python-shell-setup-codes) | 1577 | (dolist (code python-shell-setup-codes) |
| 1566 | (when code | 1578 | (when code |
| 1567 | (message (format msg code)) | 1579 | (message (format msg code)) |
| 1568 | (python-shell-send-string-no-output | 1580 | (python-shell-send-string |
| 1569 | (symbol-value code) process))))) | 1581 | (symbol-value code) process))))) |
| 1570 | 1582 | ||
| 1571 | (add-hook 'inferior-python-mode-hook | 1583 | (add-hook 'inferior-python-mode-hook |