Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '"this': 0.03; 'interpreter': 0.05; 'excluding': 0.09; 'subset': 0.09; "they've": 0.09; 'way:': 0.09; 'runs': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'bug,': 0.16; 'excluded': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'importerror': 0.16; 'importerror,': 0.16; 'letting': 0.16; 'modules.': 0.16; 'weird': 0.16; 'wrote:': 0.18; 'server,': 0.19; 'seems': 0.21; 'import': 0.22; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; 'mon,': 0.24; 'cc:2**0': 0.24; 'header:In- Reply-To:1': 0.27; 'wondering': 0.29; 'message- id:@mail.gmail.com': 0.30; '>>>>': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'anyone': 0.31; 'there.': 0.32; 'run': 0.32; 'maybe': 0.34; 'could': 0.34; 'case,': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'skip:> 10': 0.36; 'url:org': 0.36; 'should': 0.36; 'pm,': 0.38; 'rather': 0.38; 'little': 0.38; 'gone': 0.61; 'back': 0.62; 'soon': 0.63; 'carefully': 0.74; 'cuts': 0.84; 'them)': 0.84; 'to:none': 0.92 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=t5P5AZUTrVtMuHDXdbTh5SKY0KX9J08mUeSBGm+K+f8=; b=CWSR1iYA2urvvW7m162VuaYh16xfX5Xl8aAgGSleLvHJxZ9yzfMX+Wvw0DF8vIttj8 OMFLX7FPRRdOSVfHAcsKztaG+jaSmaw1LZ3SrgiZJr1QWWf+byFsnAkFMtmh5EaWvZJI bC8VTRF/RDrGJTmQA41/iKFK8//Ulk9+Fo0mo5Tg9lbhZ2DBzAA5JodcGlk6+nuOYunk b8iGAByiSxOd56k6ZlPVahOBAdF0snt/1D79e9Qy4RoXM51kQDjcv9ATBj5UheSjCqNY YmjUxLyHptgl8/UaFf3OifNuw0ZtNbXsI+hq5fAJwN2z7WnY5iLelXo8iaA+mBBoavf7 jg4g== MIME-Version: 1.0 X-Received: by 10.42.15.19 with SMTP id j19mr26990912ica.59.1407121786141; Sun, 03 Aug 2014 20:09:46 -0700 (PDT) In-Reply-To: <53def7fe$0$29974$c3e8da3$5496439d@news.astraweb.com> References: <53dee1e2$0$9505$c3e8da3$5496439d@news.astraweb.com> <5gstt9lf3ui5r6novjof9k0mnim3rqqlhl@4ax.com> <53def7fe$0$29974$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 4 Aug 2014 13:09:46 +1000 Subject: Re: CodeSkulptor 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.15 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1407121789 news.xs4all.nl 2889 [2001:888:2000:d::a6]:46251 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75656 On Mon, Aug 4, 2014 at 1:03 PM, Steven D'Aprano wrote: >>>>I think it's not a bug, but a restriction; since it's letting you run >>>>code on their server, and since Python sandboxing is a hard problem, >>>>CodeSkulptor cuts down the available modules. From the docs: >>>> >>>>http://www.codeskulptor.org/docs.html#tabs-Python > > Excluding datetime seems rather extreme to me. By the look of their docs, they've actually gone the other way: it's not that they've excluded datetime, but that they've carefully vetted a specific set of modules (and maybe not all functionality in them) and that's all they support. In any case, I think that as soon as you hit an ImportError on the sandbox, you should go and download Python for your desktop and start working there. (Idea, for anyone who runs a sandbox like that: Enumerate all packages and modules in the stdlib, and create a little stub for each of them. "import blahblah" will still produce ImportError, but "import datetime" could report back "This interpreter is working with a small subset of the Python standard library" rather than leaving us wondering if there was some weird copy/paste error in the import line. And yes, I did test for that.) ChrisA