CodeSkulptor

Chris Angelico rosuav at gmail.com
Sun Aug 3 23:09:46 EDT 2014


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.)

ChrisA



More information about the Python-list mailing list