All Collections
Courses
Course Development
Debugging IDE potential issues
Debugging IDE potential issues
George Boorman avatar
Written by George Boorman
Updated over a week ago

What technologies work with IDEs?

At the time of this writing, only Python courses support IDE exercises (although the Editor exercise appears as an option on all courses).

What are some things that Normal Exercises do that IDEs can’t do?

  • IDEs don’t work with the HTML viewer, which means they can’t render any plot.

  • IDEs can’t run as Sequential or Iterative exercises.

  • IDEs don’t record student submissions, which makes improving IDE exercises harder as you can’t see what students struggle with on an exercise by looking at the code submitted on the Content Dashboards.

  • IDEs use a Bash console, when Normal Exercises use an IPython console. This means that execute Python code from the console in a Normal Exercise, you would use !python3, but in an IDE you would use python3 without needing an exclamation mark in front.

Cleaning up environment at exercise initialization

In IDE courses, the state of the environment persists from one exercise to the other. This can lead to a FileExistsError in the exercise console or in the build log as students create a file with the same name as another existing file.

It is good practice to clean up the environment before starting any manipulation in the PEC section. To remove a file, use an approach similar to the one below:

import os
os.remove(path)

To remove an empty directory, use an approach similar to the one below (if the directory is not empty, you will get an OSError in the exercise console or in the build log):

import os
os.rmdir(path)

To remove a directory and the files it contains, use an approach similar to the one below:

import shutil
shutil.rmtree(path)
Did this answer your question?