An Integrated Development Environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools and a debugger.
Python’s specific IDE
There are many IDEs for Python, but none are perfect, and there is no consensus in the Python community. There is no real “canonical” choice as Rstudio is the one for R
users.
As Python is a real jackknife programming language, depending on your goal (data scientific program, web development, etc.) you may choose a specific IDE for a particular task.
We warmly recommend you use an IDE, and we will mostly describe VSCode in what follows.
VSCode/Codium
For instance, you can use VSCode
. This is a powerful, cross-platform IDE that comes with many extensions.
On the FdS-Linux box, there is a fork of VSCode
called vscodium
. You may launch it via the GUI or through the following command line:
$ vscodium
or:
$ code
Install a VSCode extension
We will install the Python extension. To install it:
- Open VSCode.
- Open the Extensions tab (left bar of the VSCode window or simply press
Ctrl+Shift+X
). - Type Python to find the Python extension from Microsoft.
- Click the
Install
button, then theEnable
button.
or:
- Open VSCode.
- Press
Ctrl+P
to open the Quick Open dialog. - Type
ext install ms-python.python
to find the extension. - Click the
Install
button, then theEnable
button.
or:
- Run in a terminal:
$ vscodium --install-extension ms-python.python
An advanced text editor
The keyboard shortcuts Reference guide
is available in the help
menu (or with Ctrl+K Ctrl+R
shortcut). It can be very useful to learn some shortcuts. For instance:
- Learn how multicursors work (e.g., search for an occurrence with
Ctrl+d
). - Create aligned multicursors with
Ctrl+Shift
. - Learn how to move an entire line with
Alt+up
. - etc.
Using VSCode as a Python IDE
Reference: VSCode docs for Python
This part is dedicated to setting up VSCode
to use it as a Python IDE. You should have a working VSCode
(with Python extension) and anaconda
program.
Recommended extensions for VS Code
- Python: Python.
- Markdown: Markdown All in One.
- linter/flake8: cornflakes.
- Spell check: Grammarly, SpellChecker or LTex.
- Live Share to collaboratively edit and debug with others in real-time, regardless of your programming language.
- Quarto.
- LaTeX: LaTeX Workshop.
- etc.