-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python layer: fix the problem of ipython hanging on windows #2075
Conversation
…s for running ipython on windows properly
python-shell-completion-string-code "';'.join(get_ipython().Completer.all_completions('''%s'''))\n") | ||
(if (system-is-mswindows) | ||
(setq python-shell-interpreter "python" | ||
python-shell-interpreter-args "-i c:\\python27\\scripts\\ipython-script.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not a good idea to hardcode this since this is python version specific. Maybe a variable should be introduced, and the background explained in the readme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I should have introduced a variable to hold the real path of ipython-script.py. However, I'm not familiar with elisp since I'm new to it. Can you help me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK any variable listed in the :variables
keyword for a layer is available to use. See e.g. the python-test-runner
variable https://github.com/syl20bnr/spacemacs/blob/develop/contrib/!lang/python/packages.el#L129
You should be able to introduce a variable and then just use it instead of the text. You also want to set a default like this in the config.el file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added the relative path to ipython-script.py with
(concat "-i " (file-name-directory (executable-find "ipython")) "ipython-script.py").
@yqu212 thank you for the PR, is this PR still needed in 0.104 and above ? If yes, can you rebase this PR against last develop ? |
No. The problem seems to have been solved in 0.104. However, there is another problem of ipython which do not display correctly on windows. The above-mentioned solution also works for the new problem. So, I will contribute a new PR later. |
@yqu212 thanks 👍 |
As the original poster is going to contribute a new PR, I'm closing this one. |
ipython hangs when called on windows. I reconfigure the python-shell-interpreter and python-shell-interpreter-args to run ipython on windows properly according to the suggestion from http://emacswiki.org/emacs/PythonProgrammingInEmacs, i.e.,