[SciPy-User] Porting code from IDL to Python - 'Common block' equivalent?
Charles R Harris
Fri Jul 23 09:37:20 CDT 2010
On Fri, Jul 23, 2010 at 4:19 AM, David Andrews <firstname.lastname@example.org> wrote:
> Okay, thanks for the input, all. I've just fiddled around with it a
> bit, and it seems that Robin's suggestion makes the most sense.
> Define a module that has the persistent data in it. That can then
> provide load / unload type functions that manage the data it stores.
> Used inside of ipython it looks like it prevents needing to re-load
> data unnecessarily.
> As an aside, it looks to me like the cPickle stuff is actually
> substantially faster than I thought it might be, so it's probably not
> as prohibitive as I thought to use that as a session 'scratch file' or
> whatever one wants to call it.
If you use cPickle for large amounts of data the protocol becomes important,
there is a vast speed difference between the default protocol and
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User