BT

Refactoring and Profiling Python with Visual Studio

by Jonathan Allen on Jul 27, 2011 |

Microsoft’s Developer Division has released a release candidate of Python Tools for Visual Studio. In addition to supporting refactoring in CPython and IronPython, this release offers support for MPI (Message Passing Interface) and Microsoft HPC (High Performance Computing). Visual Studio Ultimate owners also get a profiler for CPython.

According to the HPC & Cloud Features walkthrough posted on the project site, there are two ways scale your computations using Python.

  • Batch mode: Via MPI, using the MPI4PY wrappers on a cluster
  • Interactive mode: Via the integrated IPython Shell on a cluster (or by using IPython by itself)

While the MPI standard was primarily designed for use with clusters and supercomputers, there are other ways to leverage it. For testing purposes an multi-core development machine can be sufficient for reasonably small workloads. Another option is to “Cluster of Workstations” where in PCs use idle cycles for processing data. (The most famous example of this idea is the SETI@home project.)

IPython is a “comprehensive environment for interactive and exploratory computing” with a heavy emphasis on parallel programming. IPython runs on top of any Python 2.6 interpreter including IronPython and PyPy.

Python Tools for Visual Studio also supports many of the standard features one would expect. Built-in project templates are available for

  • Python/IronPython Console Applications
  • Python MPI Applications
  • IronPython with WPF
  • IronPython with Silverlight Web Page (Essentially this uses Python instead of JavaScript for an otherwise normal webpage)
  • IronPython with WinForms

For a dynamic language the Intellisense support is quite robust. “The type inference is control flow independent and works across function, class, and module boundaries and is updated in real time while you’re developing your application.” There is also support for the navigation bar, “go to definition”, and “find all references” features. The refactoring support we mentioned in the headline is new in this release. Currently is supports renaming and method extraction. The Object Browser is also supported, with the method signatures displayed using Python syntax.

The debugger works with CPython, IronPython, and Python MPI and has the normal support for breakpoints and variable exploration.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT