From the Real Python

By Jon Fincher
Heart of the machine compiles

How to do Python development on Windows? Do you use a plain text editor like Yamami, or do you use a more sophisticated IDE? Do you want to use the built-in command line tool or install a new Terminal? This article will show you how to take advantage of Microsoft’s official maintenance of MS Terminal and VS Code to protect Python development.

  • What is Microsoft Terminal

  • How about Microsoft Terminal

  • Install Visual Studio Code

  • Discover and install the Python extension

  • Write simple Python applications

  • Know how to run and debug existing Python programs in VS Code

  • Connect VS Code to Git and GitHub and share your Code with the world

The emerging Microsoft Terminal

  • MS Terminal open source address: https://github.com/microsoft/terminal

How does MS Terminal work





Install and configure VS Code




Python extension

  • Both Python 3.4 and later and Python 2.7 are supported

  • Code completion is done using IntelliSense

  • Linting

  • Debugging support

  • Snippet support

  • Unit test support

  • Automatic use of Conda and virtual environments

  • Code editing in Jupyter environment and Jupyter notebook


  • Keymaps allows users who are already familiar with Atom, Sublime Text, Emacs, Vim, PyCharm, or other environments to get started easily.

  • Theme custom UI, whether you like to code in bright, dark, or more colorful places.

  • The language pack provides a localized experience.

  • GitLens provides a number of useful Git features directly in the edit window, including non-responsible comments and repository development capabilities.

  • Automatic saving can be easily done by selecting File, Auto Save from the menu. The default delay is 1000 milliseconds, which can be reconfigured.

  • Settings Sync allows users to synchronize their VS Code Settings across devices using GitHub. If users are working on different computers, this helps to keep the operating environment consistent.

  • Docker allows users to use Docker quickly and easily, helping to compose Dockerfiles and docker-comemater.yml, package and deploy projects, and even generate the appropriate Docker files for projects.


Visual Studio Code configuration file

Start a new Python program


Enter Python code





Running Python code

Edit existing Python projects

  • Create a folder to hold projects (possibly including a new GitHub project)

  • Change to a new folder

  • Create the initial Python code using the command code filename.py

cd /path/to/project code .



Support for code testing



Debugging support

  • Automatic variable tracking

  • Monitor expression

  • The breakpoint

  • Call stack check





Git integration


  • Commit the file to Git

  • Push changes to and retrieve them from a remote repository (remote Repo)

  • Check-out Existing or creating new branches and tags

  • View and resolve merge conflicts

  • View Diffs




WAIC 2019 Developer Day will be held on 31 August at the Shanghai World Expo Center with 1 main unit, 4 sub-units, hackathon and developer Clinic interactive area.

At that time, the world’s top AI experts, technology giants, representatives of well-known enterprises and thousands of developers will gather in Shanghai to share and interpret the cutting-edge theories, technologies and development practices of ARTIFICIAL intelligence.

Click to read the article and register now.