[IPython-dev] Extension loading

Jason Grout jason-sage@creativetrax....
Sat Sep 29 15:42:24 CDT 2012


On 9/29/12 3:16 PM, Thomas Kluyver wrote:
> Thanks Jason, adding a hook is a good point.
>
> On 29 September 2012 18:47, Jason Grout <jason-sage@creativetrax.com> wrote:
>> By the way, we use a decorator to implement the run-once functionality:
>> https://gist.github.com/3804691
>
> Unfortunately that has the same problem as the global _loaded flag -
> if wouldn't let you load the same extension in a second IPython shell
> in the same process. The aim is to have a per-shell loaded flag, not a
> per-process one.

Yes, the decorator wasn't solving any problems.  It was just making the 
behavior a convenient decorator, rather than relying on someone getting 
the global variable logic right.

Thanks,

Jason




More information about the IPython-dev mailing list