Object Oriented Programming and general arguments in scientific software development: A hands-on mini workshop.
Installation
- Visual Studio Code (VSC). https://code.visualstudio.com/
- Next, install the Python extension for VS Code from the Visual Studio Marketplace. It is called "Python" from Microsoft.
- Python interpreter
- Windows: https://www.python.org/downloads/ Let the installation modify your path.
- macOS. User homebrew https://brew.sh/ brew install python3
- Linux: System installation of python3 will do. For other packages you will need to install pip.
- Check installation
- Windows: On a terminal run $ py -3 --version
- macOS & Linux: On a terminal run $ python3 --version
- Check inside VSC Open the VSC terminal and run $ py -0
Workspace and VSC Configuration
- Open a directory and make it your workspace $ mkdir something $ cd something $ code .
- Select your interpreter. Ctrl+Shift+P Type and select: "Python: Select Interpreter" Then select the one. VSC will probably show it as recommended.
- Create .py a file in the selected folder
- Write the Hello World and run it.