Visual Studio and Python

While Idle is good enough to get you started with Python, if you are going beyond the basic scripting having a full IDE is more productive. There are lots of IDE’s available that support Python and it can often be a matter of personal taste but an old timer, Visual Studio, has recently become Python friendly.

While there has been a cut down version of Visual Studio packaged with the express versions for some time, Microsoft released a Community edition starting with Visual Studio 2013. This is the fully professional version aimed at open source projects, academic research, training, education and small professional teams. There is now a Visual Studio 2015 Community edition available for those wanting the latest and greatest.

The Python Tools for VS (v2.1 for 2013 and v2.2 for 2015) have also matured to the point where Python finally feels like a first class citizen in VS. This gives you code complete, ability to select the version of Python to run against (if you have more than one version of Python installed) and all the other features you expect from VS.

Python Tools installs direct from within VS with 2015 so no more hunting around the web for the right version. It comes with some templates to get you up and running (for Bottle, Django and Flask) and also support ironPython.

Where VS really comes into its own is when you are writing in more than one language. I only stumbled across the community edition because I was doing web work. VS supports JavaScript natively and can markup HTML and CSS. Then let you see the results in the browser of your choice using the internal web server in VS. Put all this together and you can write and debug the back end server in Python, modules in C and the client side in HTML, CSS and JavaScript all from with Visual Studio. The code complete alone should justify the hour to two spent learning to use VS.

If you are compiling C modules for Python, note that Python 3.5 was built with Visual Studio 2015, so the community edition gives you everything you need to compile to to embed Python in your C/C++ programs.

For those who are signed up to the Microsoft Virtual Academy, look of for a Python and Django jump start course. Also you can download from Microsoft a Windows 10 VM pre-installed with all the Visual Studio and related SDKs.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s