[IPython-user] profile question

Ryan Krauss ryanlists@gmail....
Sat Oct 13 11:17:52 CDT 2007


O.K.  At least I'm not crazy.

I think my real question has to do with the combination of the pylab
and scipy profiles when I use the "-pylab -p scipy " combined switch
(which I almost always do).  The scipy profile doesn't seem to do
anything to import pylab.  But it seems that pylab is imported last.
I base this assertion on the zeros function that is in the global
namespace when ipython starts with this combined switch.  scipy.zeros
defaults to floating point values (which I want) while pylab.zeros
defaults to int32 (which caused bugs in several students code this
week).

How would I create a profile that combines the functionality of pylab
and scipy, but essentially does "from scipy import *" last, so that
any name conflicts default to scipy.

Thanks,

Ryan

On 10/13/07, Fernando Perez <fperez.net@gmail.com> wrote:
> On 10/12/07, Ryan Krauss <ryanlists@gmail.com> wrote:
> > I am having a problem with differences between scipy and pylab, so I
> > want to make sure that my ipython scientific profile imports pylab
> > first and then scipy, so that any namespace conflicts will end up with
> > the scipy definitions.  The problem is that I can't find what gets
> > loaded with ipython -pylab -p scipy.  Here is the content of my
> > _ipython dirctory:
> >
> > 05/16/2007  11:16 AM             1,279 ipy_user_conf.py
> > 10/12/2007  11:53 AM             1,113 ipy_user_conf.pyc
> > 10/12/2007  11:53 AM             1,113 ipy_user_conf.pyo
> > 10/12/2007  11:54 AM            24,800 ipythonrc.ini
> > 10/12/2007  11:54 AM             1,381 ipythonrc-math.ini
> > 10/12/2007  11:54 AM             2,195 ipythonrc-numeric.ini
> > 10/12/2007  11:54 AM             1,646 ipythonrc-physics.ini
> > 10/12/2007  11:54 AM             3,696 ipythonrc-pysh.ini
> > 10/12/2007  11:54 AM             1,297 ipythonrc-tutorial.ini
> >                9 File(s)         38,520 bytes
> >                3 Dir(s)  19,459,489,792 bytes free
> >
> > I poke around but can't find scipy anywhere.
> >
> > This is sort of an unfair question because I am using an installer I
> > built myself from svn a while back:
> > ipython-0.8.2.svn.r2606.win32.exe
> >
> > If no one wants to answer until I build from current svn, I'll
> > understand.  But it has to do something.  I still get this message
> > when it loads:
> > "SciPy profile successfully loaded."
> >
> > Voodoo, I tell you.
>
> It's telepathically downloaded from the secret underground ipython lair.
>
> Nah, we were having problems with the lair admins, so instead we went
> for a simpler solution: the new profiles are by default kept in
> IPython/Extensions/ipy_profile_*.py
>
> That way, unless users need to tweak them, they get updated with every
> new release (instead of cluttering their personal ipython directory
> with potentially obsolete stuff as we change things).
>
> Cheers,
>
> f
>


More information about the IPython-user mailing list