Languages
[Edit]
EN

VS Code - create Python project

8 points
Created by:
Amir-Hashempur
577

In this article, we want to show how to create and develop a Python project in VS Code.

By default, it is necessary to create Python project directory and files manually and later open the project directory in VS Code to develop it.

Prerequirements

  1. installed VS Code (link),
  2. installed Python (link),
  3. installed Python Extension Pack in VS Code (link).

Hints:

 

Example project

Project structure

Python project in VS Code.
Python project in VS Code.

 

Project preparation

1. Create a directory and go there.

e.g. C:\Projects\my-project

 

3. Create a Python source code file inside.

e.g. program.py file:

print("Hello world!");

 

5. Run in the command line:

py program.py

Where: py is shortcut for python command.

 

6. Open the directory in VS Code.

 

See also

  1. VS Code - create Java Maven project

Alternative titles

  1. VS Code - example Project project
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join