This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Create with Code

Description

create.withcode.uk lets you write, run, debug and share python code in your browser. This plugin lets you quickly embed your code projects in your wordpress site

When you share a project from create.withcode.uk, you get a URL like: https://create.withcode.uk/embed/3C or https://create.withcode.uk/run/3C

Take the last section of the URL and use it in the shortcode to embed it in your wordpress site:

[withcode id="3C"]

You can customise choose to display the code or run it using the mode attribute:

[withcode id="3C" mode="embed"] 

or

[withcode id="3C" mode="run"]

You can also specifiy the height / width of the code snippet:

[withcode id="3C" mode="embed" width="400px" height="600px"]

You can customise the colour scheme by rotating all the colours on the toolbar icons by a hue value:
[withcode id=”3C” hue=”45″]

Or you can make the toolbar icons greyscale as follows:
[withcode id=”3C” grey=”1″]

Please note:

This plugin just lets you embed python code from create.withcode.uk in a wordpress site.
The python code can be run in an iframe in your site by pressing Ctrl + Enter to run the whole program or Ctrl + Space to run one line at a time.
Python code is interpreted and run in the client’s browser: it doesn’t run on your server and it only supports a sandboxed subset of the fully python language.
This is designed as a teaching and learning aid rather than a fully fledged professional development tool.

Installation

Upload the create-withcode plugin to your blog, Activate it and add a shortcode to any page / post

Reviews

15 лютага, 2021
It is a good plugin with python 3 support and allows u to run and test python within you browser. It have some limitations but I think, with all its features these limitations are bearable.
13 верасня, 2020 1 reply
I was quite excited about this tool. Then disappointed to find out that the interpreter doesn’t implement the Python language correctly. Literally the first I thing I tried didn’t work the way it should: Python guarantees that sorting is stable, so if you run sorted(mylist, key=…) twice with different key keywords, the first sort should be preserved. But that didn’t work in Withcode. Too bad.
21 лютага, 2020 2 replies
This plugin is very easy to use. It allows you to run Python 3 code and displays the output on your website. The code displayed is color coded and we have a big sign informing the user to press “ctrl + enter” to run the Python 3 code. I like the color combination and the big sign (though I wish that that sign was permanent). What I understand is that Python is installed on a remote server. This plugin allows you to make requests to that server with Python code, run it, and fetch the output. This is done easily with a ctrl+enter keyboard shortcut. Once you enter the hotkey, it displays the output in a pretty well-contrasted theme that IMO is a color combination that should work with loads of themes. As for the execution of the code, I think that it is pretty flawless. Although I’m not sure whether file management is supported or not. The execution is pretty instantaneous runs, pretty flawlessly, on a remote server. Everything runs in a sandboxed environment. So you don’t need to bother about any python installation issues + security issues. The default color for this widget is quite classy and it goes with multiple theme selections. Overall, I’m quite satisfied with this plugin.
Read all 4 reviews

Contributors & Developers

“Create with Code” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Create with Code” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.4

  • Release Date – 26th March 2020*
    Added support for greyscale icons or a different colour scheme (hue rotation)

1.3

Release Date – 16th march 2020

1.2

Release Date – 9th Sep 2019

1.1

Release Date – 29th May 2018

1.0

Release Date – 14 April 2016

  • Initial release