Hi, long time ago there was a discussion on reducing the duplications of functions / symbols between Numpy and Matplotlib. I think from this resulted the pylab module now having many fewer entries: >>> import matplotlib >>> matplotlib.__version__ '0.98.5.2' >>> import pylab >>> len(pylab.__dict__) 882
However, I think these are still to many ! I wrote, already before the cleanup, a "HACK"-cleanup routine, which makes a cut-down modules (called P) like this: # P = new.module("pylab_sparse","""pylab module minus stuff alreay in numpy""") for k,v in pylab.__dict__.iteritems(): try: if k[:2] == '__' or v is numpy.__dict__[k]: continue except KeyError: pass #P.__dict__[k] = v exec("%s = pylab.%s" % (k,k)) ((the commented out lines did not work, but they might still illustrate what I want to do -- now I have this code in a separate module that I can import as "P" This way I get: >>> len(P.__dict__) 395 >>> numpy.__version__ '1.3.0' So why are there still that many -- more than half ! -- duplications between pylab and numpy ? Regards, Sebastian Haase ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users