From: Eric F. <ef...@ha...> - 2007-07-13 21:28:03
|
John Hunter wrote: > On 7/13/07, Ted Drain <ted...@jp...> wrote: >> I think he means that the matplotlib/__init__.py file should be >> changed to that those things are imported. > > but if __init__.py imports axes, and axes import matplotlib, don't we > still have the problem of recursive imports? Yes, but that is not necessarily fatal. It depends on the order in which things are defined and imports are made: http://effbot.org/zone/import-confusion.htm Is there a significant performance penalty, however, in forcing every module to be imported every time any mpl script is run, regardless of whether the module is used in that script? Anyway, I *think* it is feasible to arrange matplotlib.__init__.py so that it imports all the modules, and then use import matplotlib as mpl ... mpl.cbook.is_iterable(x) ... both in scripts and within mpl modules. Whether this is the best approach is another question. Eric > > JDH > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel |