Dijeli putem


Tutorial: Work with Python in Visual Studio

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Python is a popular programming language that is reliable, flexible, easy to learn, and free to use on all operating systems. Python is supported by both a strong developer community and many, free libraries. The language supports all kinds of development, including web applications, web services, desktop apps, scripting, and scientific computing. Many universities, scientists, casual developers, and professional developers use Python.

Visual Studio provides first-class language support for Python. This tutorial guides you through the following steps:

Prerequisites

You can also use an earlier version of Visual Studio with the Python Tools for Visual Studio installed. See Install Python support in Visual Studio.

Step 1: Create a new Python project

A project is how Visual Studio manages all the files that come together to produce a single application. Application files include source code, resources, and configurations. A project formalizes and maintains the relationships among all the project's files. The project also manages external resources that are shared between multiple projects. A project allows your application to effortlessly expand and grow. Using projects is much easier than manually managing relationships in unplanned folders, scripts, text files, and your memory.

This tutorial begins with a simple project containing a single, empty code file.

Next step

Go deeper