Python3 Development Tool
Python VSCode Configuration
In the previous chapter, we have installed the Python environment. In this chapter, we will introduce the configuration of Python VScode.
Ready to work:
Install VS Code
Install VS Code Python extension
Install Python 3
Install VS Code
VSCode (Visual Studio Code) is a cross-platform free source code editor developed by Microsoft. The VSCode development environment is very simple and easy to use.
VSCode installation is also very simple. Open the official website https://code.visualstudio.com/ , download the software package, and install it step by step. During the installation process, pay attention to the installation path setting and the environment variables are automatically added to the system by default. Check all the following options :
Then we install the VS Code Python extension by Microsoft:
Create a Python Code File
Open VScode, and click New File:
Click to select language:
Enter Python in the search box and select the Python option:
Enter code:
print ( "TutorialFish.com" )
Run a Python script
Right-click the mouse and choose to run the file in the interactive window.
If there is a prompt that you need to install the extension ipykernel, just click Install.
In addition, we can also open an existing file or directory (folder). For example, if we open a tutorialfish-test, you can also create one yourself:
Then we create a test.py file, click the new file icon below, and enter the file name test.py:
Enter the following code in test.py:
print ( "TutorialFish.com" )
Click the arrow icon in the upper right corner to run:
You can right-click the file and select:
Run Python File in Terminal
Run Current File in Interactive Window
You also can also right-click on the code window and select "Run Python file in terminal".