CodeSkulptor

Peter Otten __peter__ at web.de
Mon Aug 4 08:39:22 EDT 2014


Chris Angelico wrote:

> On Mon, Aug 4, 2014 at 1:03 PM, Steven D'Aprano
> <steve+comp.lang.python at pearwood.info> 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.)

All nice and dandy, but the site seems to use a Python implementation 
entirely written in javascript:

http://www.skulpt.org/

It's not a sandbox on the server, the code runs in your browser.




More information about the Python-list mailing list