Skip to content

For teachers ​

This page is for you if you prepare activities with CapyCode. The rest of the guide, written for students, details each feature.

What to know first ​

  • Nothing to install, no account. CapyCode is a web page. The code runs in the student's browser, with the Basthon kernels.
  • No data is sent to a server. The student's project stays in their browser; even a share link holds the project itself, without any online storage.
  • One project per browser. A student who changes computers does not find their work: plan a ZIP export or a share link at the end of the lesson (see Saving and sharing).
  • A connection is needed to run code. Editing, the terminal and Git work offline; running code downloads the Python interpreter (a few seconds on first launch) and the imported libraries.

Handing out an activity ​

Prepare the project in CapyCode (starter files, instructions in a README.md, data), then File › Share...:

  • Full workspace for an activity with several files, Active file only for a short exercise;
  • tick Git history to pass on commits: they are replayed for the student with their messages and dates. With Keep the other branches, the branches come too: enough to prepare a merge exercise, or even a ready-made conflict.

Paste the link in your learning platform, a document, a QR code. Keep it short (the gauge of the window shows it): some messaging tools cut long links. Images and binary files do not fit in a link.

When the link opens, CapyCode asks the student to confirm that their project will be replaced, unless they have not changed anything yet.

With a ZIP archive ​

File › Export (ZIP) produces a full copy, images and Git history included. The student opens it with File › Import (ZIP) or by dropping it on the window. An archive made outside CapyCode works too: a compressed folder, with or without a .git repository.

Collecting students' work ​

  • ZIP export: the student downloads capycode-project.zip and uploads it to your learning platform. You import it to see their project as it is, history included: the Git graph shows their approach, step by step.
  • Share link: the student sends you their link, including their Git history if needed.

Remember to export your own projects before opening the students' ones: an import replaces the current project.

CapyCode in Capytale ​

In Capytale, the French platform for coding activities in schools, CapyCode is embedded in the activity page. Capytale can set some features, for example hide Git for an introduction to Python: the Git panel, the branch in the status bar and the git command of the terminal disappear, without changing anything in the student's files.

Choosing the language ​

The interface exists in ten languages. To force English, add ?lang=en to the address: …/p/capycode/?lang=en. Python error messages stay in English; the explanations of the code analysis (underlining in the editor), however, are translated and come with a tip.

Ideas ​

GoalWith CapyCode
Discovering PythonRun button, interactive console after the run to explore the variables, explanations of errors in the editor
Writing clean codePEP 8 formatting with the details of the changes; splitting into modules (import)
Working with dataCSV files in the project, read by the program; pandas, matplotlib
Drawingturtle, graphics output in the panel
Databases.sql files run in SQLite, results as tables, SQL console
Command lineTerminal with the usual commands, redirections, python and pip
Version controlGit panel and git commands, graph, branches, merges and conflict resolution

Current limits ​

  • No remote repository: no push, pull or clone.
  • Files written by a Python program are not kept in the project (see Running a program).
  • The terminal is not a full shell: no pipes (|), variables or scripts.
  • SQL and OCaml have no analysis while typing and no formatting, and their programs do not see the other files of the project.

A remark, a problem? Help › About › Report an issue.