You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Andreas Siebel d9126736f2 fixed max-height, better error messages with p5 2 years ago
build/lib updated doku 2 years ago
demos fixed max-height, better error messages with p5 2 years ago
lib fixed max-height, better error messages with p5 2 years ago
moodle updated doku 2 years ago
skulpt_runner updated doku 2 years ago
src fixed max-height, better error messages with p5 2 years ago
.gitignore updated doku 2 years ago
README.md updated doku 2 years ago
package.json fixed max-height, better error messages with p5 2 years ago
pyproject.toml updated doku 2 years ago
setup.cfg updated doku 2 years ago

README.md

Skulpt Runner

Brython Coderunner transforms your Markdown fields and textareas into an executable IDE. You can execute code immediately and even use Turtle or Processing inside the IDE.

Demo (german):

My Homepage | See Test Folder

Usage

With the following code you can integrate skulpt_runner into your website:

The code converts all tags with the .marked class to Markdown and automatically creates a skulpt_runner IDE for code fields with the following form:

```skulpt_runner
[python_code]
```

Skulpt_runner without markdown

Code fields with the following classes are transformed in IDES:

<code class="language-skulpt_runner>
</code>

or

<code class="skulpt_runner">
</code>

Textareas can also be converted. To do this, the textareas must be enclosed by a div in the following form:

<div class="skulpt_textarea">
<textarea>
</textarea>
</div>

Settings

Settings can be passed to customize the appearance and functionality. The most elegant way to do this is to pass a JSON field right after the opening tag:

<code class="skulpt_runner">
{options="processing buttons editor"}
</code>

Variables

  • options:

    • editor: Displays the editor.

    • buttons Displays buttons (Run, Clear).

    • canvas Displays a canvas where code can be rendered.

    • processing: Loads the code as processing code.

    • turtle / Transforms import turtle in brython (loads libraries and turtle-canvas) (alpha)

  • display:

    • sketch: Hides code.

    • fullscreen: Shows IDE in fullscreen

  • preset:

    • processing: Set options to editor buttons canvas processing

    • turtle: Set options to editor buttons canvas processing

Moodle integration

You can use Brython Coderunner as moodle database activity (future) or embed it with a moodle-text-block. See moodle directory. (Currently the block must be embed in admin->additionalhtml->Before end of Body)