Matthew Bevan wrote:
> According to the Python 2.4 Library documentation:
> (http://www.python.org/doc/2.4/lib/node66.html)
>
> """Note that functions (built-in and user-defined) are pickled by ``fully
> qualified'' name reference, not by value. This means that only the function
> name is pickled, along with the name of module the function is defined in.
> Neither the function's code, nor any of its function attributes are pickled.
> Thus the defining module must be importable in the unpickling environment,
> and the module must contain the named object, otherwise an exception will be
> raised."""
>
> Similar limitations hold true for classes. Executable code, say uncompiled
> Python or Python bytecode, is not pickled or unpickled as such. Thus, we
> determined the risk to be exceedingly small.
there's a BIG warning in the pickle documentation:
http://www.python.org/doc/2.4/lib/node63.html
and it was put there for a reason:
import pickle
pickle.loads("cos\nsystem\np0\n(S'echo \
\\\"0wn3d!\\\"'\np1\ntp2\nRp3\n.")
</F>