Markdown, Python, and Flask
Generate web pages with with a bit of Markdown and Flask.
There are different ways of getting Python installed on your computer. However, since this website focuses primarily on web application development, we will cover how to download and use Python with a traditional code editor.
Python can be downloaded as an installation package from the www.python.org website for Windows, macOS, and Linux operating systems.
Installing Python is relatively easy to do. The latest versions of Python comes with the standard installation interface that walks you through the steps. Choose the default settings and enter your computer password when prompted.
After the installation completes, verify Python was installed by running the following command in the Terminal app. Windows users may need to use python --version
instead if using the Command Prompt.
python3 --version
The following output should be returned.
Python 3.10.7
Visual Studio Code, commonly known as VS Code, is a free code editor that lets you write programs in Python and many other languages. Download the app from https://code.visualstudio.com and install it on your computer.
VS Code comes with optional extensions that can improve your productivity and help make the programming experience more enjoyable.
With VS Code open, click the Extensions icon on the left menu or select the Code menu > Preferences > Extensions to open the Extensions tab.
Enter ‘python’ into the search box and install the Python extension from Microsoft. The extension adds features like IntelliSense (Pylance), linting, debugging, code navigation, and code formatting.
Different color themes are available to install in VS Code and stylize your code with different font and background colors. Choosing a theme is entirely optional and a personal preference. There are probably hundreds of themes to choose from.
Visit the VS Code documentation to learn more about this feature. You can preview and compare most of the high-quality themes on the website: https://vscodethemes.com/.
In this short post we looked at how to install Python and VS Code. In future lessons, we cover the basics of Python programming. Check out our Python reading list.