On Thu, Jul 22, 2010 at 10:02 AM, Rani Hod <[email protected]> wrote:
> > Are such options available in python? >> > > Noam Raphael once extended pickle to support code objects, similar to your > option #1. > There's also xmlrpc, but I doubt it fits your use case. > > You mean fickle? Don't blame poor Noam. Not his fault :-) http://dl.dropbox.com/u/6960989/doc/fickle_doc.html bzr branch http://amit.freeshell.org/mirror/export/fickle last tested on Python 2.4 (originally in 1.5.2). Please send problem reports to me. Idea is simple: "rigid functions" get pickled along with their byte code. By default, functions are considered rigid iff they are defined in __main__ . The reasoning: Normally both the saver (/transmitting side) and loader (/executing side) have the same modules installed, so the standard "pickle" works (it actually saves the module name and function name, then does "import" when loading). However, when the function is defined in runtime or by the saver script, it is not available on the loader, so bytecode must be saved. Have fun, Amit
_______________________________________________ Python-il mailing list [email protected] http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
