Comments (5)
[ LP comment 1 by: eteq, on 2009-09-04 00:41:46.232025+00:00 ]
This is happening for me as well in 0.10 - it's pretty annoying in that it renders dreload (a very useful function) essentially useless. It doesn't even work to do dreload(somemodulethatusesnumpy,exclude=['numpy','numpy.numpy','numpy.show'])
from ipython.
Do you think it a good idea to modify the dreload() to accept a hook argument that determines whether a given module need reloading ?
I have wrote such a patch because I usually want to reload my own modules, but not builtin modules or numpy, scipy etc.
By passing a hook list, you can choose which modules to be reloaded.
I am not sure where to submit the patch, but if you have interested in,
please let me know.
from ipython.
The exclusion/inclusion of modules should be more flexible (and actually work).
For me, limiting the reloaded modules just to specific directories was useful (c.f. excluding modules by names).
from ipython.
Yes, such a patch would be very useful, until we figure out the real problem.
@tknbamn, here's a description of our dev workflow:
http://ipython.github.com/ipython-doc/dev/development/index.html
If you're familiar with git/github, it boils down to 'make the fix in a branch, push the "pull request" button'.
I'm flagging this 'dormant' for now because it's not on the critical path for the core team right now, but we're happy to review a pull request at any time. And a bug with a pull request automatically is treated as high priority.
from ipython.
At this point my working hypothesis is that the original knee.py
(which dreload
borrows) no longer mimics Python's import mechanism closely enough.
For example, if you grab knee.py
from an old version of Python, you'll see the following::
$ python
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import knee
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "knee.py", line 16, in import_hook
q, tail = find_head_package(parent, name)
File "knee.py", line 52, in find_head_package
q = import_module(head, qname, parent)
File "knee.py", line 101, in import_module
m = imp.load_module(fqname, fp, pathname, stuff)
...
ImportError: numpy.core.multiarray failed to import
But, don't fear, I've rewritten knee.py for the new import syntax, and verified that it works in Python 2.6.7, 2.7.2, and 3.2.2.
from ipython.
Related Issues (20)
- Implement the new better error message from Python 3.11
- IPython crashes on windows server with locale.setlocale HOT 1
- Is there a way to map ctrl+h and backspace to different functions?
- Hey
- Tab completion not working for class when it has property with typing.Literal annotated return value HOT 6
- Broken link in documentation HOT 2
- Infinite redirects on http://nbviewer.ipython.org/ HOT 1
- Optional `compress_dhist()` requires `pickleshare`
- Control + C ignored after loading Rust module built with PyO3/Maturin
- Different behavior when adding virtual environment
- Autocomplete Feature Not Working after Switching Python Version
- JupiterLab matplotlib issue HOT 3
- Allow output to be included in %notebook exported files
- Autoreload slows down over time
- Jupyter NoteBook\ ipynb file not showing In and Out words HOT 2
- Released PyPI versions have tags missing from repo HOT 3
- Trying to complete `import six.moves` causes IPython crash HOT 5
- Crash when trying to show `globals()` (`__repr__ returned non-string`) HOT 3
- How to change `IPython.terminal.shortcuts.newline_autoindent` to 2 extra spaces?
- : documentation build fails with `cannot import name 'system' from 'IPython.utils.process'` error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipython.