[IPython-user] profile question
Sat Oct 13 13:30:48 CDT 2007
you can create a new profile and set the option pylab_import_all to 0.
assuming you want pylab in the namespace, just import pylab before scipy
in the profile. that will import all the stuff you want, in the order
you want, but still have it set up to handle the gui stuff properly.
on a vaguely related note, i noticed that ipy_user_conf.py is executed
after ipy_profile_*.py files when using a profile. why is this? it
would seem to me that user_conf should be executed first to set up the
general global settings i like across all profiles, and then if any
particular profile needed a special tweak i could put it in there and
override. with user_conf executed second, it forced all behavior in
there. example being if i generally don't like autocall on, but in my
shell profile i'd like it to be set to 2. in that case i'd have to set
autocall in all my profiles just to ensure that the proper value got
On Sat, 2007-10-13 at 11:17 -0500, Ryan Krauss wrote:
> 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
> 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.
> On 10/13/07, Fernando Perez <email@example.com> wrote:
> > On 10/12/07, Ryan Krauss <firstname.lastname@example.org> 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
> IPython-user mailing list
More information about the IPython-user