Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57930 > unrolled thread

Re: Pickle virtual machines implemented in other languages?

Started byNed Batchelder <ned@nedbatchelder.com>
First post2013-10-29 12:28 -0400
Last post2013-10-29 12:28 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Pickle virtual machines implemented in other languages? Ned Batchelder <ned@nedbatchelder.com> - 2013-10-29 12:28 -0400

#57930 — Re: Pickle virtual machines implemented in other languages?

FromNed Batchelder <ned@nedbatchelder.com>
Date2013-10-29 12:28 -0400
SubjectRe: Pickle virtual machines implemented in other languages?
Message-ID<mailman.1764.1383064129.18130.python-list@python.org>
On 10/29/13 12:12 PM, Patrick wrote:
> Hi Everyone
>
> I was just wondering if anyone had tried to implement a pickle virtual 
> machine in another language? I was thinking that it might make for a 
> nice little form of cross language IPC within a trusted environment.
>

Pickle can execute class constructors, which is what makes it insecure.  
But this also means that you need to have the class definitions on the 
receiving end, which means the receiving end must be in Python.  Unless 
you special-case some set of Python classes and their equivalents in the 
other language, you are limited to the primitive builtins like string, 
dict, list, float, etc.  In that case, you might as well just use json 
as your transport format.

--Ned.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web