There are some Gtk-specific functions at the bottom of mlab.py. It tries to "import gtk" and then will either define them or not.
On one of my recent profiling fests, I noticed that this "import gtk" (if gtk is installed, and running with some non-Gtk backend) accounts for between 1-2% of the total running time over all the examples in backend_driver.py. Not a huge amount, but it seems like it might be a good idea to avoid importing something as large as gtk unless we actually need to. We can either import gtk "on demand", when one of these gtk-related functions is called, or perhaps better yet move this to another module, that would only be imported when needed. In light of recent pylab.py/mlab.py refactorings, are there any opinions on this? Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel