BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Refactoring and Profiling Python with Visual Studio

| by Jonathan Allen Follow 125 Followers on Jul 27, 2011. Estimated reading time: 1 minute |

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.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login 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

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT