John Hunter wrote:
> I don't think this will work in this form.  artist is a module, and it
> is not imported simply by importing matplotlib
> 
> In [1]: import matplotlib as mpl
> 
> In [2]: mpl.artist

however, this seems to work (though it looks perhaps a bit odd)

>>> import matplotlib as mpl
>>> import matplotlib.artist
>>> mpl.artist
<module 'matplotlib.artist' from
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/artist.pyc'>


I do like this better -- names like mpl_*** rub me the wrong way. it
looks like you really want a namespace -- and indeed you do!

maybe the real solution is to have the matplotlib called "mpl" from the
get go, like wxPython does:

import wx
wx.Whatever...

I do wish that:

>>> import matplotlib as mpl
>>> import mpl.artist
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ImportError: No module named mpl.artist

worked.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]


-------------------------------------------------------------------------
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
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to