[SciPy-User] Porting code from IDL to Python - 'Common block' equivalent?
Charles R Harris
charlesr.harris at gmail.com
Fri Jul 23 10:37:20 EDT 2010
On Fri, Jul 23, 2010 at 4:19 AM, David Andrews <irbdavid at gmail.com> 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
protocol=2.
<snip>
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20100723/72652757/attachment.html>
More information about the SciPy-User
mailing list