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
qtconsole ignores exec_lines #545
Comments
This code definitely works for me. |
Do you set any other exec_lines values in ipython_config? You can see the current config by printing |
Starting using "ipython qtconsole", get_ipython().config shows me the following:
'TerminalInteractiveShell': {'colors': 'Linux'}} The 'TerminalIPythonApp' entry appears to be because I have "c.TerminalIPythonApp.exec_lines = ['from future import division']" in my ipython_config.py file for this profile. I can comment out this line, and it will disappear. Either way, though, I still get the 1/3=0 behavior... |
On a hunch, I pulled the latest master (apparently I was a few days behind), and rebuilt ipython. After trying again, this issue now seems to be resolved, so I guess it was very recently fixed. Sorry for the noise! |
Ah, you said it was in |
When I start a new qtconsole using a profile I've defined (or, for that matter, the default profile), the IPKernelApp.exec_lines configuration option seems to be ignored. Based on the behavior of the ipython_config.py TerminalIPythonApp.exec_lines option, I would have expected lines in the IPKernelApp.exec_lines list to be run when I start the qtconsole.
For example, if I add the following line to my ipython_qtconsole_config.py file:
and then run the qtconsole, inputting "1/2" still gives me "0" instead of the expected "0.5". On the other hand, if I execute "from future import division" by hand and then "1/2", "0.5" comes out.
The text was updated successfully, but these errors were encountered: