[Python-il] remote execution of python code
aronovitch at gmail.com
Thu Jul 22 23:37:43 IDT 2010
On Thu, Jul 22, 2010 at 10:02 AM, Rani Hod <rani.hod at gmail.com> 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 :-)
bzr branch http://amit.freeshell.org/mirror/export/fickle
last tested on Python 2.4 (originally in 1.5.2). Please send problem reports
Idea is simple: "rigid functions" get pickled along with their byte code.
By default, functions are considered rigid iff they are defined in __main__
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-il