Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'subject:Python': 0.05; 'cc:addr:python-list': 0.09; 'scripting': 0.09; 'interpreter': 0.15; 'variables': 0.15; '23,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subprocess,': 0.16; 'wrote:': 0.16; 'python?': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'pass': 0.22; 'header:In- Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'opposed': 0.27; 'reflect': 0.27; 'other,': 0.29; 'objects': 0.29; 'program,': 0.29; 'point': 0.33; 'structure': 0.34; 'received:google.com': 0.35; 'there': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'christian': 0.38; 'does': 0.39; 'some': 0.40; 'easy': 0.60; 'more': 0.63; 'therefore': 0.67; 'chrisa': 0.84; 'explorations': 0.84; 'gollwitzer': 0.84; 'isolate': 0.84; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=KloKiR9vwJZB1UXz6vactJlMXMBvUafVFT3dq33our8=; b=WsXc+wcdS9u1cMjE6kPA8IE6eTFX5TeF9gvdVw9TwvoaPN7OpPvh9sN3WihRIZOxCa ZiTmWxY1uIqwDam3Urr0QI9kBB2wbmwGaXCxNv+sPwH8DKbpxYpN5cVobPdqZA+aNIaN Bv0xALGRLoUByMBNM4jq6H7OgH2EwD3X7AMtSr0K5pgbU9b/y1cJYl3Jre7tlsEmVMcg BtLnV1YO+6JPz14YFGHCospVhfN8cAwD17+FmVMh6iMe7lMtODJzMj2jJtpZyMo/BbYb 7Pjhl1n4U5FU/Nzf4GSTH5w/aMzBl4xNcDoV616hurVJ+JxV5PWKty538OStIrXJovh9 asXQ== MIME-Version: 1.0 X-Received: by 10.107.32.4 with SMTP id g4mr12698436iog.31.1440308508478; Sat, 22 Aug 2015 22:41:48 -0700 (PDT) In-Reply-To: References: Date: Sun, 23 Aug 2015 15:41:48 +1000 Subject: Re: Sandboxing Python From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1440308516 news.xs4all.nl 23772 [2001:888:2000:d::a6]:55594 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95578 On Sun, Aug 23, 2015 at 3:17 PM, Christian Gollwitzer wrote: > Would it be that difficult to get the same for Python? On the C side, the > interpreter is a structure and does not use global variables (as opposed to > CPython), therefore it is easy to create more than one interpreter in a > single program, and also to reflect that to the scripting level. There have been some explorations in that direction. However, it would be very difficult to pass objects from one interpreter to the other, so you'd be restricted to some form of serialization... at which point you may as well just use a subprocess, which you can isolate using OS facilities. ChrisA