1. Pyroom
  2. Tutorials
  3. Sharing code
  4. Embed a runnable Python program on a website

Embed a runnable Python program on a website

Share as iframe gives you embed code with options: read-only code, which buttons to show and the default language.

Advanced Video coming soon. The steps below show everything the video will cover.

Steps

  1. Write the program you want to show on your site.
  2. Open Share, then Share as iframe.
  3. Choose what visitors can do. For example, make the code read-only so the example stays intact.
  4. Select Copy iframe and paste the code into your web page or learning platform.
Read the transcript

Write the program you want to show on your site.

Open Share, then Share as iframe.

Choose what visitors can do. For example, make the code read-only so the example stays intact.

Select Copy iframe and paste the code into your web page or learning platform.

Try it in the Playground

Nothing to install and no account needed.

Open Playground →