Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Hey guys just came across Skulpt and its just awesome. I think it will suit nice to my project I am working on.
    Satyajit Sarangi
    @jstrang6 there is a window on the main page which shows the javascript code
    Hi, is there any pointers for how to create a new module for skulpt? Is there a template or something I can start with ?
    Martin Davtyan
    hey guys I just tried getting into Skulpt and the provided example doesn't seem to work
    I tried running that and it gives ImrortError: no module named 'sys' on line 6
    did anybody else have that problem?
    Herman Bergwerf
    Hi, I failed to make a POST request in skulpt

    my code: ```import urllib.request

    inchi = "InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H"

    pugrest = ""
    input = "compound/inchi"
    operation = "record"
    output = "json"
    options = "record_type=3d"

    url = pugrest + "/" + input + "/" + operation + "/" + output + "?" + options

    response = urllib.request.urlopen(url, b'inchi=InChI%3D1S%2FC6H6%2Fc1-2-4-6-5-3-1%2Fh1-6H').read()

    print response```

    Herman Bergwerf

    More specific, this is not working: ```import urllib.request


    with trinket at least
    might they be causing issues?
    hello, I am running Skulpt in MeteorJS (using react components), and in my server-side handler I use npm to import Sk from "Skulpt". I later call this function and pass to it the contents of the in-browser code-editor: Sk.importMainWithBody("<stdin>", false, source);
    I am getting this error when I do a simple print "hello"
    ExternalError: ReferenceError: self is not defined on line 2
    Brian Broll
    After building the ast is there a way to generate python from it?
    Basically, modify the ast then generate python from the modified ast?
    Rahul Thawal
    Hello I am been using skulpt for python i did some research on pygame with skulpt but did not succeed. Can anyone suggest is there a way I can use pygame with skulpt.
    @Jacco Hi,Jacco,where can i get the amazing calendar lib for skulpt?Thank you!
    Jacco Kulman
    Hey Alex, its been a while since I worked on skulpt
    Are you maybe looking for some uncommited work I did?
    Jacco Kulman
    Found the file, can commit it on my fork / timemodule branch
    Maybe some more is missing, let me know I still have some uncommited stuff
    @Jacco OK,thank you sir.
    @Jacco when i run the sample you gave above for calendar,it raise an exception:ImportError: No module named datetime on line 2,do you have the datetime module?
    Jacco Kulman
    Ow ok
    I'll commit the one I have here on the same branch on my fork.
    I thought was merged with the main project
    if its still not working, i'll commit the whole dir, but you should use these files with the skulpt/skulpt project not my repo
    OK,I see.Thank you again. @Jacco
    It is ok now. @Jacco Thank you again.
    But the time.setLocale("en") not work @Jacco
    Jacco Kulman
    commited the rest too, it includes some work on regular expressions too. May be you can cherry pick :-)
    can skulpt safely run untrusted code?
    I don't want infinite loops crashing the web page
    maybe I can use web workers
    @Jacco you there?
    @Jacco Great,Thank you!
    @Jacco After rebuild with your commited files,when i use the time module,it raise an error: ExternalError: TypeError: Cannot read property 'locale' of undefined on line 1,and in your time.js,I found the comment:// locale/setLocale need to be in os.environ or something,and in your,there is only one line code:environ = {}
    @Jacco I don't know whether i missed something?
    Andy Bayer

    I'm running the following Python code in Skulpt:

    class MyClass(object):
        meta = []
        def __init__(self):
            MyClass.meta += [self]

    sometimes it runs correctly, sometimes it throws AttributeError: 'str' object has no attribute '[object Object]' on line 5.
    does anyone know what the configuration is that's making this possible sometimes (but not always)?

    I have added Skulpt editor its working fine now..but i dint get the inbuilt keywords in color.
    what to do ? anyone can explain me please
    Nikita Rudy
    Greetings everybody.
    I recently updated skulpt lib version on our server, and now a new issue appeared
    For some reason users are not able anymore to use unicode strings without u' prefix (they could before)
    Can you give me a tip?
    Domas Makšimas
    hey guys! can't find any refenrences on this online, so asking here. Does anybody know how to create an instance of class in JS? I have created a class with Sk.misceval.buildClass and now I want to create instances of it.
    ABIX Adam Jurkiewicz
    Hi. I want to use Skulpt with pygame, found project. But it uses old skulpt-stdlib.js and does not support F-strings and Python 3. Does anybody knows something, which is open source, skulpt with Python3 and pygame compatible?