Publisher review:Instantiating pickled instances transparently script load a pickled instance and returns it. This script addresses the following two needs:
- Object construction for some class is expensive.
- Objects of this class need to be instantiated across multiple runs of the program.
For example, object instantiaton may involve reading one or more big files, connecting to a database or a network socket with considerable expected delay, etc.
The autopickle decorator deals with this problem by wrapping the __init__ of the class. The first time a specific instance is created, it is also pickled to a file. In all subsequent attempts to create the same instance, the pickled instance is loaded and returned instead. If unpickling the file is faster than creating the instance normally, all but the first instantiations are faster than the normal one.
The instance determines the path of the file to be pickled to by calling its getPickleFilename() method. This takes the same arguments given in __init__ and it has the responsibility to specify a valid and distinct path for the instance.
Instantiating pickled instances transparently 1.0 is a Python script for Python Modules scripts design by George Sakkis.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Instantiating pickled instances transparently script load a pickled instance and returns it.
Operating system:Windows / Linux / Mac OS / BSD / Solaris