📜 ⬆️ ⬇️

Python in Visual Studio 2010



Python is getting closer for those who love and use Visual Studio 2010. Recently, the IronPython project site has published free tools for working with Python code in Visual Studio.

IronPython is an implementation of the Python 2.6 language created by Microsoft for the .NET platform, the code of which can be used in other .NET languages ​​and, on the contrary, in IronPython it is possible to call code from .NET projects.
')
image

The tools that are now integrated into the Visual Studio 2010 development environment now offer a full-fledged opportunity to develop projects in the Python language. And for many .NET developers, these tools will be an excellent opportunity to learn a new language for you in a familiar environment.

Consider the possibilities of new tools and how they integrate into Visual Studio.

Installation


All you need is the availability of Visual Studio 2010 RTM ( Express supported ) and the installation of tools from this page . The package of tools is small, the installation is very fast.

Projects


The tools add several new project types to Visual Studio: Console Application, WinForms Application, Silverlight Web Page, and WPF Application.

image

Intellisense


To support code editing offers a large number of features, including Intellisense. Supports the possibility of completing the names of code elements, help on signatures, quick information when you hover over an element.

image

In addition, Intellisense supports both built-in Python functions and .NET classes.

image

Completion of the code also works for importing modules.

image

Intellisense is able to distinguish between types in a tuple or lists and suggest correct code completion.

image

In addition to all, Intellisense has the ability to show the signature of code elements when writing code.

image

And finally: Intellisense can suggest what values ​​a variable can take in your code.

image

Navigation


IronPython tools integrate into the Visual Studio 2010 navigation bar so that you can quickly navigate through the Python code.

image

Support for the “Go to defenition” function is included, which allows you to quickly jump to the definition of an element in the code.

image

Support for the “Find All References” function is included, which will allow you to find all the uses of your element in the code.

image

Interactive window with Python interpreter


These tools add to Visual Studio 2010 an interactive window with a Python interpreter, in which you can execute arbitrary code or transmit it for execution from the editor window.

image

image

image

In addition, Intellisense is supported in the interactive window.

image

When editing code, it can be sent to an interactive window for execution.

image

Object Browser


IronPython tools are also integrated into the object browser, which allows you to view all modules and the elements contained in them.

image

Debugger


IronPython tools integrate into the Visual Studio 2010 debugger, allowing you to debug your Python applications in a familiar environment. While debugging for IronPython does not offer the same features as for C #, but the developers promise to make the debugger more heaped up in future releases.

image

image

Conclusion


Working with Python for a .NET developer is becoming more interesting and can now occur in the native environment of Visual Studio. The output of such tools should spur developer interest in the Python language and other dynamic languages. The full functionality of the tools will allow to integrate Python into .net projects. And this is great.

PS: the images for the article are taken from the IronPython For Visual Studio Walkthrough document (pdf), I recommend reading it for a more detailed introduction to the tools.

Source: https://habr.com/ru/post/92705/


All Articles