dendrograms/dendro-core — pull request #3 by astrofrog (2012-10-23 14:44:16+00:00)
Title: Prevent use of dynamic ``__import__``

I would prefer if we didn't use ``__import__`` because it feels a bit hacky, and is not relative-import friendly. What do you think about the following way? It does mean adding an entry to the main ``dendrogram.py`` file when a new file format is added, but I don't think it will happen very often.

This means moving the ``h5py`` and ``pyfits`` imports inside the functions to prevent ``ImportErrors`` if the dependencies are not installed, and also involves moving the imports of ``Dendrogram``, ``Branch``, and ``Leaf`` inside the import method to prevent circular imports.