When learning (or teaching) python for GCSE or A Level Computer Science, one of the first decisions you will need to make is which coding environment to use. This is actually no easy task as there are so many options to choose from. In this article I’m going to give an overview of some of the more common and/or useful ones.
I have listed some of the more important pros and cons for each environment below.
CodeSkulptor
CodeSkulptor is the environment of choice for some excellent Python courses on Coursera, which is a hub for Massive Open Online Courses (MOOCs). There are actually two version of CodeSkulptor available – one for the now outdated Python 2 and one for Python 3. This is the link for the original CodeSkulptor for Python 2.
CodeSkulptor Pros
- You can start to program in Python straight away with zero setup, other than an internet connection
- Lots of great demo programs available
- Easily share code by simply sharing a hyperlink
- It has a simple but powerful GUI (Graphical User Interface) module that makes is easy to get started with writing visually attractive interactive programs
- Has “Viz Mode” for tracing program execution
CodeSkulptor Cons
- It’s not really Python! (It’s a JavaScript implementation). This means that not all of Python’s features and modules are available.
- Working with external files such as images and text is different to what you might be used to and will require some re-learning
- You need an internet connection to use it
IDLE
IDLE is the default editor that comes with Python when you use the standard installation.
Idle Pros
- It’s fairly easy and intuitive to use
- There is an “interactive mode” where you can type in and execute commands without creating a separate file
- It provides debugging tools
IDLE Cons
- No line numbers! This can be frustrating, especially when discussing your code with others. However there is a workaround where you click on a line of code and see the line number displayed in small print at the bottom of the editor.
- Limited editing capabilities compared to some other options.
PyCharm
PyCharm is a powerful Integrated Development Environment for serious Pythonistas.
PyCharm Pros
- It’s powerful
- A huge array of configuration options
- Easy code reformatting
- Code hinting and code completion
PyCharm Cons
- It takes a while to load
- You need to create a whole project even to just run a simple script
- It’s more than you will often need and can be overwhelming
Notepad++
Sometimes referred to as Npp, Notepad++ is my personal favourite and I have used it for many years.
There are basically two ways to run Python scripts with it. One is the use a run command from within the program, which looks something like this:
cmd /c cd "$(CURRENT_DIRECTORY)" &python -i "$(FILE_NAME)"
(This is a somewhat advanced method)
Or you can open up a cmd
shell, navigate to the folder with your .py
script in and type python {script_name}.py
and off you go, assuming python is in your system path.
Notepad++ Pros
- Quick and easy to use once set up
- Lots of plugins available
- Powerful configuration options
- Great choice of themes/styles
Notepad++ Cons
- Initial setup can be difficult
Those are some of the more popular choices for a Python development environment. There are many others available as well, but it may be helpful to limit your options to one of the above in the beginning, to avoid becoming overwhelmed. Once you have more experience and know what your needs are, you may find other options which suit you better.
Having said that, if none of the above are quite right for you, other options could be trinket, repl.it and Sublime Text 3.