Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #75645

Re: CodeSkulptor

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
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; '"""': 0.07; 'importerror:': 0.07; 'interpreter.': 0.07; 'bug.': 0.09; 'implements': 0.09; 'subset': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'bug': 0.12; 'bug,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'letting': 0.16; 'modules.': 0.16; 'wrote:': 0.18; 'module': 0.19; 'server,': 0.19; 'import': 0.22; 'aug': 0.22; 'putting': 0.22; 'cc:addr:python.org': 0.22; 'install': 0.23; 'library,': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'gets': 0.27; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'operations,': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'run': 0.32; 'actual': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'library.': 0.36; 'url:org': 0.36; 'first': 0.61; 'such': 0.63; 'provide': 0.64; 'statement,': 0.68; 'cuts': 0.84; 'to:none': 0.92; 'serious': 0.97
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=PdjnnH4SkmeqYV1TQqbd6pSePTP161U/G2y5u3ZYx8M=; b=nC6pyRlzDH60qQkO9UIJ4ziZzhOQ+MeqaIeb3z8DOkEN+W6a0fV0muPht+eNxP0esh 2vaQcKpdaFcipR2FYflNdA7X9LCEiSUogbmbzRO3ha4vP22IuteNfkJrZD1Q2c7ySyNb eYLX4rWFEPVz1xsZh83sLN31nr3dRKcfh5n1MkNhlmV8uw3UsFsTFWmeL/uxB8FufROh xstb+48TXxN9cr38mXChOrMxaRtaGZcGtUqJPWHS1aJ6se0nvtW8CimpVQa1WOX8VMnB 9cX4PElm7a/eGKrW3k4at8s7zoibe74PwayNuNLT6CrVtlWAd5jAdn5So5XKDYUOYn8T RNRA==
MIME-Version 1.0
X-Received by 10.50.176.202 with SMTP id ck10mr32162130igc.2.1407116628343; Sun, 03 Aug 2014 18:43:48 -0700 (PDT)
In-Reply-To <53dee1e2$0$9505$c3e8da3$5496439d@news.astraweb.com>
References <pkmtt9135hrbk9l7u3bq9no55ttok69q3p@4ax.com> <53dee1e2$0$9505$c3e8da3$5496439d@news.astraweb.com>
Date Mon, 4 Aug 2014 11:43:48 +1000
Subject Re: CodeSkulptor
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12611.1407116631.18130.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1407116631 news.xs4all.nl 2897 [2001:888:2000:d::a6]:36659
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75645

Show key headers only | View raw


On Mon, Aug 4, 2014 at 11:29 AM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
>> Putting that in codeskulptor gets
>>
>> Line 4: ImportError: No module named datetime
>
> Well that's a bug in CodeSkultor. datetime is a standard Python library, if
> CodeSkulptor doesn't provide it, that's a serious bug.

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
"""
CodeSkulptor implements the following subset of the Python standard
library. To use these operations, first import the relevant module
with an import statement, such asimport math.
"""

Solution: Don't try to run Python code in your browser, but download
and install an actual interpreter.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

CodeSkulptor Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-03 21:06 -0400
  Re: CodeSkulptor Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-04 02:21 +0100
  Re: CodeSkulptor Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-04 11:29 +1000
    Re: CodeSkulptor Chris Angelico <rosuav@gmail.com> - 2014-08-04 11:43 +1000
      Re: CodeSkulptor Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-03 22:08 -0400
        Re: CodeSkulptor Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-03 22:38 -0400
          Re: CodeSkulptor Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-04 13:03 +1000
            Re: CodeSkulptor Chris Angelico <rosuav@gmail.com> - 2014-08-04 13:09 +1000
            Re: CodeSkulptor Peter Otten <__peter__@web.de> - 2014-08-04 14:39 +0200
            Re: CodeSkulptor Chris Angelico <rosuav@gmail.com> - 2014-08-05 00:18 +1000
          Re: CodeSkulptor Chris Angelico <rosuav@gmail.com> - 2014-08-04 13:05 +1000
        Re: CodeSkulptor Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-08-04 10:26 +0200
    Re: CodeSkulptor Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-03 21:41 -0400
      Re: CodeSkulptor Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-04 02:56 +0100
        Re: CodeSkulptor Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-03 22:07 -0400
          Re: CodeSkulptor Terry Reedy <tjreedy@udel.edu> - 2014-08-04 03:02 -0400

csiph-web