Today, I’m excited to announce the release of Python Tools for Visual Studio (PTVS), which is now available for download from CodePlex.
The Python ecosystem has been enjoying tremendous growth over the past few years, attracting all types of programmers from scientists to web developers to hobbyists. To support this growing community, we’ve released PTVS, an extension to Visual Studio that provides for Python the wealth of features developers desire in a modern and mature IDE. PTVS is aimed at enthusiast and professional Python developers alike. PTVS also includes features specialized for technical computing. Over the past several months, I’ve blogged about multiple projects related to our technical computing initiative, including Solver Foundation, Dryad, and TPL Dataflow. PTVS is another unique and exciting project in this area. It's a free extension to Visual Studio that can be used with the Visual Studio Integrated Shell (available for free download) as well as with Visual Studio Professional and higher.
Key PTVS features include:
- Support for CPython, IronPython, Jython, and PyPy
- Advanced editing capabilities, including IntelliSense
- Multiple refactorings, such as “Extract Method”
- A built-in REPL (read-eval-print loop) window
- Debugging and profiling capabilities
Visual Studio has a great editing experience, and with PTVS this experience now extends to the Python language. Capabilities begin with basics like syntax highlighting and extend to support for the navigation bar and object browser. It provides IntelliSense for your Python code based on a deep analysis of either your project or a directory of files, including understanding your classes and methods and peering into how you’re using core Python data structures like lists, tuples, and dicts. Additionally, based upon the same analysis used for IntelliSense, PTVS provides “Find all References” and “Go to Definition” features, which allow you to quickly navigate your code. You can get a sense for the editing experience from this screencast.
PTVS also includes refactoring support to make you more productive. This release automates two commonly needed refactoring patterns: “Extract Method” and “Rename Variable”. Extract method enables you to quickly excerpt a code snippet into a new method, making your code more readable and enabling better reuse. “Rename Variable” will rename all usage of a specified symbol in your code, supporting locals, module globals, and classes.
One of the most important aspects of Python development is interactivity, and PTVS integrates a Python REPL directly into Visual Studio. The REPL window will work for all of the aforementioned Python variants and supports auto-completion, syntax highlighting, and visualizations. For users accustomed to the enhanced REPL provided by IPython, PTVS supports IPython 0.11. For developers using IronPython, the REPL supports Sho.
One of the main focuses of our technical computing efforts has been parallel and distributed computing, and this PTVS release includes multiple features targeted at this area. In addition to standard debugging support, PTVS enables MPI cluster debugging. With this you can create a Python application and easily debug it on your Windows HPC cluster. Press 'F5', and your application will be deployed to the cluster and launched with debugging support. You’ll then be able to debug across all of the relevant processes across all of the involved nodes. This provides a great development experience when doing high performance computation in Python.
I'm also excited to inform you of the availability of the NumPy and SciPy Libraries for .NET. This port to .NET by Enthought, Inc. enables IronPython and other .NET languages to take advantage of these important technical computing libraries which support mathematical, engineering, and scientific domains.
Finally, I’d like to highlight that PTVS is open source, released under the Apache 2.0 license. I encourage your participation in this exciting Python project, and we look forward to hearing your feedback on the effort.