Created
December 5, 2012 09:53
-
-
Save jorgenschaefer/4214390 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Here is a complete example of the settings you would use for | |
| ;; iPython 0.11: | |
| ;; (setq | |
| ;; python-shell-interpreter "ipython" | |
| ;; python-shell-interpreter-args "" | |
| ;; python-shell-prompt-regexp "In \\[[0-9]+\\]: " | |
| ;; python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: " | |
| ;; python-shell-completion-setup-code | |
| ;; "from IPython.core.completerlib import module_completion" | |
| ;; python-shell-completion-module-string-code | |
| ;; "';'.join(module_completion('''%s'''))\n" | |
| ;; python-shell-completion-string-code | |
| ;; "';'.join(get_ipython().Completer.all_completions('''%s'''))\n") | |
| ;; For iPython 0.10 everything would be the same except for | |
| ;; `python-shell-completion-string-code' and | |
| ;; `python-shell-completion-module-string-code': | |
| ;; (setq python-shell-completion-string-code | |
| ;; "';'.join(__IP.complete('''%s'''))\n" | |
| ;; python-shell-completion-module-string-code "") | |
| ;; Unfortunately running iPython on Windows needs some more tweaking. | |
| ;; The way you must set `python-shell-interpreter' and | |
| ;; `python-shell-interpreter-args' is as follows: | |
| ;; (setq | |
| ;; python-shell-interpreter "C:\\Python27\\python.exe" | |
| ;; python-shell-interpreter-args | |
| ;; "-i C:\\Python27\\Scripts\\ipython-script.py") | |
| ;; That will spawn the iPython process correctly (Of course you need | |
| ;; to modify the paths according to your system). | |
| ;; Please note that the default completion system depends on the | |
| ;; readline module, so if you are using some Operating System that | |
| ;; bundles Python without it (like Windows) just install the | |
| ;; pyreadline from http://ipython.scipy.org/moin/PyReadline/Intro and | |
| ;; you should be good to go. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment