Commit 0edb156
committed
use short names for submodule imports to ease imports out of mpl_toolkits
It is difficult to import the basemap module when it is not installed
along with the rest of the mpl_toolkits package. This change uses local
imports in the basemap package for submodules with potentially
conflicting global modules. This way it is easier to include the basemap
package when it is installed in a different location (e.g. a virtualenv
using system mpl_toolkits).
Python ensures that an import first looks in the containing package when
importing, this way it is not necessary to specify the full module name:
https://docs.python.org/2/tutorial/modules.html#intra-package-references
It addresses issues like:
http://stackoverflow.com/questions/18772557/how-can-one-locally-install-an-extension-to-an-existing-system-python-module1 parent ee6a2f7 commit 0edb156
3 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
0 commit comments