Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Visual Studio/Python

From Wikibooks, open books for an open world
<Visual Studio

Since Visual Studio 2010, VS has support for debugging and running Python applications.

Notes

[edit |edit source]

Python is aninterpreter, not acompiler. This means that, barring syntax errors, the code is executed at runtime. Hence Visual Studio (and others) have weak IntelliSense support.

Installation

[edit |edit source]

Follow the instructionshere. In particular, while youcan use Visual Studio 2017's installer to install Python, this isn't needed and Python can be installed otherwise. The same applies if you want to use alternative Python distributions like Anaconda-Python.

Usage

[edit |edit source]

Once you've installed it, a new project can be created by Python -> Python Application or from the option "From Existing Python Code". Running the Python code will open a command window where the code is run, and one can set breakpoints like any other program.

Information
Hint: Visual Studio requires a project file to be created for Python. However, this does not mean that you cannot use other programs at the same time. For example, if you are using Spyder, then simply open the main .py file from there; VS does not add any extra information to it.
Retrieved from "https://en.wikibooks.org/w/index.php?title=Visual_Studio/Python&oldid=3761550"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp