get_ipython returns None when called from startup file
See original GitHub issueI’m following the instructions given here. Nevertheless, and despite https://github.com/ipython/ipython/issues/9791 and https://github.com/ipython/ipython/pull/9818:
i. get_ipython
is not exposed as a builtin.
ii. Even when imported as described in the documentation, get_ipython()
returns None
.
The startup file is just profile_default/ipython_config.py
.
I’m testing this agaist the latest revision:
ipython --version
6.2.0.dev
git log
commit 3a7e880c793ab1477c2180376a4bd98651febc03 (HEAD -> master, upstream/master, upstream/HEAD)
Merge: ebb001ec4 6d2b31146
Author: Matthias Bussonnier <bussonniermatthias@gmail.com>
Date: Mon Jun 12 08:18:57 2017 -0700
Merge pull request #10655 from adityausathe/master
Feature req #10556: %timeit could use local scope
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
`get_ipython' doesn't work in a startup script for IPython ...
This is an incomplete suggestion -- but if get_ipython isn't in the namespace yet, you can try importing it directly:
Read more >Module: core.interactiveshell — IPython 8.7.0 documentation
Find and return a magic of the given type by name. Returns None if the magic isn't found. find_user_code(target, ...
Read more >Python Examples of IPython.get_ipython - ProgramCreek.com
The following are 30 code examples of IPython.get_ipython(). ... import IPython.display if IPython.get_ipython() is not None: def obj_to_dict(obj): return ...
Read more >Plain diff - Demokritos
from IPython.kernel.zmq.kernelapp import launch_new_instance - return ... the right call via the component system -from IPython import get_ipython - -from ...
Read more >1.0 Series — IPython 3.2.1 documentation
IPython.embed() is used for embedding IPython into the calling namespace, ... def get_ipython(): """return IPython instance if there is one, None ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s not a startup file! See the section Startup files here:
http://ipython.readthedocs.io/en/stable/interactive/tutorial.html#startup-files
@memeplex do you have any sample code. I am facing the same problem, but couldn’t able to get your conversation about reading the config file @takluyver
do I need to change any config under
ipython_config.py
, my objective is todefine_macro
in ipython