-
Notifications
You must be signed in to change notification settings - Fork 287
Make ptipython respect more config changes #110
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
Conversation
Currently ptipython loads extension modules, but does not execute lines from the config file.
|
Hi @sac2171, Sorry for the late reply. Can you have a look at whether this still applies when using together with IPython 5.0. If it still works correctly in that case, I will merge it. |
|
Are there plans to integrate this? Its currently the only thing preventing me from switching to ptpython. |
|
I can take another look at this soon-ish, not sure if it is still relevant. |
|
I can confirm this change still works with IPython 6.1.0 is and still a useful change. |
|
This works for me with python 3.5.2 and IPython 6.2.1 Full config: |
|
|
|
Could we merge this? Autoreloads on startup only work if this is added. as outlined here django-extensions/django-extensions#1240 (comment) |
|
@jonathanslenders any movement on merging this? |
|
i create pr here shanechin#1 so this pr can be easily merged into upstream i notice there is some inconsistency with single and double quote character but i keep that to minimalize change from original pr |
|
@rachmadaniHaryono just use ipython or smth else -- nobody gives an f here |
|
I can confirm this still functioning with ipython 8.6.0 @jonathanslenders The patch is pretty simple and would unlock a really useful feature. Any chance you might have some time to spend reviewing this soon? 🙏 |
|
Just tested. It works like a charm 👍 |
Currently ptipython loads extension modules, but does not execute lines from the config file.
For example, I was trying to initialize the autoreload app from ipython,
c.InteractiveShellApp.extensions = ['autoreload']
c.InteractiveShellApp.exec_lines = ['%autoreload 2']
c.InteractiveShellApp.exec_lines.append('print("Warning: disable autoreload in ipython_config.py to improve performance.")')
The first line worked, while the other two were ignored.
This allows ipython configuration to support use cases mentioned in:
#36
#65
I'm sure there are a lot more cases where the ptipython interface is slightly different from the ipython one, but I'm not sure what the plan for convergence is, so for now I tried to follow around the same pattern as initialize_extensions.