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


Groups > comp.lang.python > #57930

Re: Pickle virtual machines implemented in other languages?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <nedbat@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'definitions': 0.07; 'json': 0.07; 'python': 0.11; 'language,': 0.12; 'builtins': 0.16; 'equivalents': 0.16; 'language?': 0.16; 'subject:virtual': 0.16; 'language': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'patrick': 0.19; 'pfxlen:0': 0.19; 'machine': 0.22; 'header:User-Agent:1': 0.23; 'string,': 0.24; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'tried': 0.27; 'wondering': 0.29; 'end,': 0.31; 'pickle': 0.31; 'subject:other': 0.31; 'anyone': 0.31; 'class': 0.32; 'another': 0.32; 'everyone': 0.33; 'classes': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'format.': 0.36; 'subject:?': 0.36; 'virtual': 0.37; 'implement': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'pm,': 0.38; 'little': 0.38; 'environment.': 0.39; 'to:addr:python.org': 0.39; 'within': 0.65; 'dict,': 0.84; 'float,': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=fLLgXnHW2BLmnXDfjgNSppe+qwRDE0ESy+r6BlDIGyY=; b=ssA7vLcOTtgxWdDRA1DI32H2pU3qKNZ4Aer9iMNSWcZQAj7ZGWyd60ld1zSKNovej1 VPzWGaM2R8Vtq6sjRM12SZb/6lNEGA0nOVHZq8slHvxRXMgnYw4pyyY43ji3NiQs0LKR x7qIKgLQzL2pdVg1Jm76FeO/Y61VFgTaiZoDtfZGMsbjvTr1tE2J7gO2vOD3+fu5CFzv T0Ivk29Kf/UV8bFHPqh3+zKtGTQ9aDhJEQJzUCcr9DSk6YL3Hr2emrynsGWLKF+Q81dh 7dVJKudpwHwFWdWxjLkbDoyKUXgqx7VIAf63AfiKNNw7WlFjnj30zZVHEQnbVvaQROXi MgAg==
X-Received by 10.58.201.234 with SMTP id kd10mr173166vec.32.1383064120287; Tue, 29 Oct 2013 09:28:40 -0700 (PDT)
Sender Ned Batchelder <nedbat@gmail.com>
Date Tue, 29 Oct 2013 12:28:37 -0400
From Ned Batchelder <ned@nedbatchelder.com>
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.0.1
MIME-Version 1.0
To Patrick <patrick@spellingbeewinnars.org>, python-list@python.org
Subject Re: Pickle virtual machines implemented in other languages?
References <526FDE75.2080303@spellingbeewinnars.org>
In-Reply-To <526FDE75.2080303@spellingbeewinnars.org>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1764.1383064129.18130.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1383064129 news.xs4all.nl 15874 [2001:888:2000:d::a6]:34908
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:57930

Show key headers only | View raw


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.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web