Getting started with Python Tools for Visual Studio 2013

This week I’ve had the pleasure to be at my first Pycon (2014) in Montreal. During the event I attended some sessions but mostly worked the Microsoft booth with the Python Tools for Visual Studio product team.

For those that don’t know, Python Tools is a free and official extension from Microsoft that has been in development as an open source project since 2011. During my time at our booth though many Python developers stopped by and most were very surprised with comments such as “I had no clue Microsoft makes tools for Python”. Honestly this reaction was not unexpected as our developer tools are typically associated with things such as .NET and its managed languages (C#, VB or F#), or web technologies such as HTML, CSS & JavaScript.

Its time tough to dispel this misconception, as Microsoft has gone beyond what is expected and has been on a long journey (since 2011) to bring other languages into Visual Studio, starting with tools for Python and more recently work on Node.js support.

Python Tools for Visual Studio

image

In this post I’ll focus on Python and hopefully help folks get started, which can be confusing especially for developers who never used Visual Studio before (or recently).

So lets start by talking about a few key facts, such as:

  • To run Visual Studio 2013 you’ll need a Windows machine as unfortunately there is no version of Visual Studio that runs on Mac or Linux
  • You can’t just install the Python Tools to get started, you’ll first need to have Visual Studio 2013 installed first and ill explain how to get it (free) below

Now with those two facts as our foundation, lets talk about what it will take to get Python Tools 2.1 Beta for Visual Studio 2013 working on a Windows machine.

Get Started with Python Tools 2.1 Beta for Visual Studio 2013 Express+

Unless you already have Visual Studio 2013 installed with Update 2 (RC) you’ll need to follow these steps to get started:

License (aka Cost) Things to Install (in order) Tips & Notes
Visual Studio Express is Free Visual Studio 2013 Express for Web
  • Visual Studio Express editions are free, but you will need to register to download them
  • If you already have Visual Studio 2013 Pro or higher SKU you don’t need to download the Express version, so skip to the next step
  • If you plan to do IronPython desktop development get this expression version: Visual Studio 2013 Express for Desktop
  • The express link here are Web installers, but if you want to manually download the full ISO Express SKU installers you can get them here
Update 2 is Free for Visual Studio 2013  Visual Studio 2013 Update 2 (RC)
  • Without “Update 2” for Visual Studio 2013 you won’t be able to install Python Tools for Visual Studio in an Express SKU, but its not required if you have Pro+
  • Update 2 is currently a Release Candidate, but it does have a go-live license
Python Tools for Visual Studio are Free & Open Source Python Tools 2.1 beta for Visual Studio 2013
  • The latest release of Python Tools is 2.1 Beta that just shipped to the public on 4/10/2014
CPython & IronPython are Open Source CPython 3.x or 2.x for Windows or IronPython
  • Currently you’ll need CPython 2.x in order to publish your Python websites to Microsoft Azure Websites, but any version will work locally or in another hosting environment that supports the right configuration
  • For CPython we recommend using the x86 version

Why use Python Tools for Visual Studio?

You might be asking yourself why would I bother to use Visual Studio for Python? There are a lot of great reasons, as Visual Studio has features for Python developers that simply don’t exist in any other IDE. Our top features are listed below to give you just some idea of the capabilities.

Top Visual Studio Features for Python

Those developers who have used Visual Studio often love our IDE, and now with Python Tools we bring many of the loved features to the world of Python development.

These include features such as:

  • Support for CPython, IronPython or other interpreters
  • Powerful code editor to view/edit code files with support for IntelliSense
  • Debugging support of Python code with breakpoints, even in Django templates or code running on remote machines
  • Remote debugging support from Windows to a Linux or MacOS host
  • Mixed debugging for Python & C++ code in the same session
  • Profiling support (In VS Pro+)
  • Interactive Window with IPython integration
  • Build websites using popular web frameworks such as Django, Bottle and Flask with built-in templates for easy getting started
  • Rich integration from the IDE for managing source control using Git or Microsoft’s TFVC
  • Integration with Microsoft Azure for hosting your Python websites

Python on the Microsoft Azure Cloud

One great way to host a new Python website is to do it in the Microsoft cloud called Azure. To learn all about hosting Python on Microsoft Azure you visit the Python Dev Center.

On Azure you’ll be able to host your Django, Flask or other web framework sites, including the ability to host IPython Notebook’ (the dev center has all the details).

Where to learn more?

Videos

The Microsoft Python Tools team has various videos available to learn more about the tools, including:

You can also see more videos here in the Pytools Video Library or directly on the Pytools YouTube channel.

Blog Posts

Various blog posts have talked about PTVS, including:

Tutorials & Documentation

If you want a walkthrough to help get you started check out:

Feedback

Thanks for reading, and please don’t hesitate to send the PTVS team feedback via any of the following mechanisms: