a lightweight but powerful source code editor
Choose the suitable platform and download the stable version via:
Download the python extension for visual studio code via the Link, it supports:
Windows
Download via the link and install it, remember to configure the system path
macOS
Install brew and run the command
brew install python3
at the terminal prompt
Linux
Linux's built-in python packages work well
On the explorer panel, click the "Open Folder" button to choose the desired the directory to put your file
Click the "New File" button and create a new file named "hello.py", and edit its code as follow
msg = "Hello World"
print(msg)
Configure the interpreter in the lower-left corner
Result printed in the command prompt
Click the green triangle in the upper right corner
other ways to run
You could set a break point on line 2 of hello.py by
Break point is an intentional stopping place in a program. It allows you to examine the state of the running program at the break point such as the variables' value
Press F5 to call the configuration menu and
choose the "Python file as the file type".
The program will start at the first breakpoint, you could see the information of the variables in the left column
A debug toolbar appears along the top with the following commands from left to right:
Gitpod is a ready-to-Code Development Environments for GitHub and GitLab
You could log on to gitpot with your own github or gitlab account, it may take some time for gitpot to prepare the environment for you
{ "version": "0.2.0", "configurations": [ { "name": "Python: Current File", "type": "python", "request": "launch", "program": "${file}", "console": "internalConsole" } ] }