On Mon, Jun 28, 2010 at 4:40 PM, Matthew Brett <matthew.brett@gmail.com> wrote:Hi,
> I propose moving the scipy/io/matlab directory to scipy/io/matfile and have
> the __init__.py file for scipy.io to import scipy.io.matfile as matlab. I
> don't know if that works for all of the ways one would call that module.
> Also, is there any sort of way to make a deprecation warning fire for
> importing scipy.io.matlab, but not for scipy.io.matfile? I never had to do
> any sort of fancy module setup, so I am not sure what is best.
I think that won't work
for people who have done things like
import scipy.io.matlab
or
from scipy.io.matlab import loadmat
and I'm not sure what would, apart from a symbolic link - but then I
don't know how you'd raise the deprecation warning.You could put the following in scipy/io/matlab.py:import warningswarnings.warn(...)from scipy.io.matfile import *-Ken
_______________________________________________
SciPy-User mailing list
SciPy-User@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user