Appendix B — Technical guidance - Python

B.1 What programs are required for a computer

To write Python code you will need the Python program, an IDE (Integrated Development Environment) like VSCode and Python is supported within RStudio (including in Quarto scripts).

Installing Python will require admin rights for the person installing it.

To check that Python has been installed (on Windows) open the Command Prompt (accessed via the Windows button on the keyboard on a Windows computer) and type py --version.

B.1.1 Installing the Python extension to VS Code

The following is a step by step guide from Microsoft:

The next page in the learning module is a good introduction to creating a folder and a python file which can be run

Command line code

The default location for the folder is in C:/Users/ so a few commands can be useful for the Terminal: - cd means change directory - cd .. moves the folder up one level - cd folder-name moves to a sub folder where there are no spaces in the name - cd 'folder name' moves to a sub folder where there are spaces in the name - dir means directory and will show all the folders and files