Reputation: 9552
I know ipython has a very extensive configuration system. I've looked all over in the generated ipython_config.py file for a way to configure certain settings. I would like to always start ipython with %doctest_mode on.
Is there an easy way to do this? I've tried adding this command in the c.TerminalIpythonApp.code_to_run configuration option. However, this causes ipython to start up, run the command and exit instead of being interactive.
Upvotes: 3
Views: 227
Reputation: 40390
Instead of code_to_run
, find these lines in your config file:
# lines of code to run at IPython startup.
# c.InteractiveShellApp.exec_lines = []
If you put commands in there, they'll be executed, and you can use IPython interactively.
Upvotes: 3