How to use skulpt - 2 common examples

To help you get started, we’ve selected a few skulpt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uccser / cs-field-guide / csfieldguide / static / interactives / python-interpreter / js / python-interpreter.js View on Github external
$("#interactive-python-interpreter-run").click(function(){
        var program = document.getElementById("interactive-python-interpreter-code").value;
        var output = document.getElementById("interactive-python-interpreter-output");
        output.innerHTML = '';
        Sk.configure({output:skuplt_out});
        try {
            Sk.importMainWithBody("<stdin>", false, program);
        } catch (e) {
            alert(e);
        }
    });
github uccser / cs-field-guide / csfieldguide / static / interactives / python-interpreter / js / python-interpreter.js View on Github external
$("#interactive-python-interpreter-run").click(function(){
        var program = document.getElementById("interactive-python-interpreter-code").value;
        var output = document.getElementById("interactive-python-interpreter-output");
        output.innerHTML = '';
        Sk.configure({output:skuplt_out});
        try {
            Sk.importMainWithBody("<stdin>", false, program);
        } catch (e) {
            alert(e);
        }
    });

skulpt

Skulpt is a Javascript implementation of Python 2.x. Python that runs in your browser!

MIT
Latest version published 2 years ago

Package Health Score

63 / 100
Full package analysis