matlab (TM)

Actually, since it's the package that most users probably

    > actually want, would it be more suitable to move
    > matplotlib.matlab into matplotlib itself? Then we could
    > simply

    > import matplotlib

    > Obviously that would mix the main user routines (plot()...)
    > with the more administrative namespace (get_backend(),
    > is_interactive()...) and maybe you'd want to move those into
    > a separate (always imported) subpackage along the lines of
    > matplotlib.res?

It is technically possible to reorganize the code to support this, but
it would break a lot of code in a nontrivial way. While it is trivial
to search and replace instances of 'from matplotlib.matlab' with 'from
matplotlib.pylab' and so on, it would not be trivial to port scripts
that were using the matplotlib admin funcs after the kind of
reorganization this would entail.

But your post did give me an idea that might satisfy everyone and
provide the ease of use your idea suggests. If we migrate
matplotlib.matlab to matplotlib.pylab as discussed, *and* add an
additional file pylab.py that resides in site-packages and is a one
liner

  from matplotlib.pylab import *

then we preserve the easy conversion from old namespace to new
namespace while making it easy for script writers to do

  from pylab import *

Plea to distutils gurus: if you can figure out a way in the current
matplotlib setup.py setup to get a module named pylab.py into
site-packages, please advise! The current module layout is somewhat
complicated and already stretches my distutils capabilities.

Of course if you were using Fernando's wonderful pylab feature in
ipython, it would be a trifle concern anyhow, since the import is done
automagically.

JDH

John Hunter wrote:

Plea to distutils gurus: if you can figure out a way in the current
matplotlib setup.py setup to get a module named pylab.py into
site-packages, please advise! The current module layout is somewhat
complicated and already stretches my distutils capabilities.

I wouldn't call myself a distutils guru, but is this what you mean?

#!/usr/bin/env python
from distutils.core import setup

setup(py_modules=['pylab'],
      package_dir = {'':'path/to/where/pylab.py/source/is/located'})