Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.04; 'ide': 0.05; 'interpreter': 0.05; 'subject:Python': 0.06; 'python': 0.08; 'subject:don': 0.09; 'url:filename': 0.09; 'am,': 0.12; 'debugging': 0.13; '16,': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hmm.': 0.16; 'side.': 0.16; 'wed,': 0.17; 'language': 0.17; 'wrote:': 0.18; 'received:209.85.210.174': 0.18; 'received:mail- iy0-f174.google.com': 0.18; 'programming': 0.21; 'etc,': 0.23; 'header:In-Reply-To:1': 0.23; 'code,': 0.27; 'language.': 0.28; 'message-id:@mail.gmail.com': 0.29; 'server': 0.30; '(so': 0.30; 'nov': 0.31; 'app': 0.32; 'to:addr:python-list': 0.32; 'done': 0.33; 'platform,': 0.34; 'something': 0.36; 'another': 0.36; 'doing': 0.37; 'but': 0.37; 'page': 0.37; 'received:google.com': 0.38; 'easier': 0.38; 'received:209.85': 0.38; 'client': 0.38; "i'd": 0.39; 'should': 0.39; 'basic': 0.39; "it's": 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'your': 0.61; 'back': 0.62; '2011': 0.62; 'watch': 0.64; 'url:asp': 0.77; 'subject:hard': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=B9YRlpQPYSD6qM5YLMJ11zjWJxbf91zHkndgj9eNsxw=; b=vp4OoppbOF3eMC22vUgM3mEhwZqUJRyE/UmVMRfPE4MCQPd5+uXDNtglKwTzWLgYAt nfTv7Ud2ydeURovDhwoa2aRmmiTLPRC2PqMPdY6ocE9kw3POAbj7Aegx+1c6bJN1VhT/ m8jaEdGJ3fQiAT48pobTfwP1FSePTLPr54F6k= MIME-Version: 1.0 In-Reply-To: <11816254.67.1321389423944.JavaMail.geo-discussion-forums@vbay19> References: <11816254.67.1321389423944.JavaMail.geo-discussion-forums@vbay19> Date: Wed, 16 Nov 2011 07:45:52 +1100 Subject: Re: (don't bash me too hard) Python interpreter in JavaScript From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1321389956 news.xs4all.nl 6884 [2001:888:2000:d::a6]:35072 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:15738 On Wed, Nov 16, 2011 at 7:37 AM, Passiday wrote: > The app would have basic IDE for writing and debugging the python code, b= ut the interpretation, of course, would be done in JavaScript. I'd like to = avoid any client-server transactions, so all the interpretation should take= place on the client side. The purpose of all this would be to create educa= tional platform for learning the programming in python. Hmm. If it's to be an educational platform, I would recommend doing something like the W3Schools "tryit" page [1] and just go back to the server each time. You have potential security issues to watch out for (so it may be worth chrooting your interpreter), but it's sure to be easier than rewriting the entire interpreter in another language. You would have to maintain your implementation as the language evolves, keep it bug-free, etc, etc. ChrisA [1] eg http://www.w3schools.com/html/tryit.asp?filename=3Dtryhtml_basic