[IPython-User] [IPython-dev] Last call for 0.13.1

MinRK benjaminrk@gmail....
Tue Oct 16 13:38:44 CDT 2012


On Tue, Oct 16, 2012 at 11:14 AM, Matthias BUSSONNIER <
bussonniermatthias@gmail.com> wrote:

>
> Le 16 oct. 2012 à 20:03, David Warde-Farley a écrit :
>
> > On Tue, Oct 16, 2012 at 1:45 PM, Matthias BUSSONNIER
> > <bussonniermatthias@gmail.com> wrote:
> >>
> >> Le 16 oct. 2012 à 19:24, David Warde-Farley a écrit :
> >>
> >>> On Thu, Oct 11, 2012 at 7:22 PM, Aaron Meurer <asmeurer@gmail.com>
> wrote:
> >>>> You may want to start a deprecation cycle for the SymPy printing
> >>>> extension, which has been moved to SymPy itself as of 0.7.2.  I would
> >>>> just have the following logic:
> >>>>
> >>>> if SymPy version is 0.7.2 or greater: use the ipython version (or
> >>>> should it use the sympy version?), but emit a deprecation warning
> >>>> telling the user to just load sympy.interactive.ipythonprinting
> >>>>
> >>>> if SymPy version is less than 0.7.2: don't do any warnings
> >>>>
> >>>> And then, when it's been long enough that probably most people are
> >>>> using SymPy 0.7.2 and IPython 0.13.1 or greater, remove it entirely.
> >>>
> >>> Hmm. I just fired up one of my SymPy-centric notebooks that I haven't
> >>> touched in a while with IPython master, SymPy still 0.7.1 from EPD
> >>> 7.1-2, and the pretty printing is mysteriously not working with
> >>> %load_ext sympy. Any idea why?
> >>
> >> %load_ext sympyprinting ?
> >> ( note that it is currently being moved from IPython to the sympy
> module)
> >
> > Thanks Matthias.
> >
> > Was it always named "sympyprinting"? I had %load_ext sympy in my
> > notebook and it used to work, strangely.
>
> I've always known the extension as sympyprinting.
>
> >
> > Why does %load_ext sympy still work then? Does it just silently pass
> > with any module name? (I noticed just now that "%load_ext pickle"
> > works…).
>
> Hum; I have no idea why `%load_ext module` works, or if it should print a
> warning when there is no extension available with a module.
> Let's say it's a feature, so that for modules that have extension bundled
> in it you don't have to remember the name of the extension.
>

I believe this is the way extensions work:

%load_ext [module]

which imports [module], then *if module.load_ipython_extension is defined*,
calls `module.load_ipython_extension(shell)`.  The IPython extensions dir
is just added to sys.path.  In this way, any module can be an IPython
extension.  We could definitely add a message in cases where
`load_ipython_extension` is not defined, which would suggest that it may
not actually be an extension (not necessarily the case).

But someone who is more familiar with the extension machinery can correct
me.

By the way, I wrote an extension this morning: autosave for notebooks (
https://github.com/minrk/autosave_ipython)

-MinRK


> --
> Matthias
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20121016/a51c3500/attachment.html 


More information about the IPython-User mailing list