One of Microsoft's Best Kept Secrets: Python Tools for Visual Studio
Inspired by r0ml's talk on thinking about a program as an "image" rather than as a bunch of text files, I started exploring IDEs for Anaconda python.ย
My first discovery: The Anaconda distribution comes with an IDE called Spyder. Very light-weight. It runs pylint and support an Ipython console. It supports changing between environments by providing a window to the windows environment variables (not so good). Very cool to see how much easier debugging can be in an IDE.
Second discovery: I am one of those rare Hacker Schooler's who have a windows machine. And yesterday I discovered something which actually can make my python development easier: Python Tools for Visual Studioย (PTVS - MS's best kept secret). This is a free bundle that is much lighter-weight than eclipse and has many great features.ย
In the above blog post, the author gives the ultimate complement to PTVS:
"I installed windows just so i can use PTVS" - Comment on Hacker News
I have only touched the surface but here are some things I've discovered so far:
1: Easy to add multiple environments ย (for ex, python 2.7 and python 3.3) and switch between them with a single click. For each environment, I selected an interpreter: Ipython with pylab. This allows figures to be displayed inline. Highlight code in the editor and Ctrl-E-E and it runs in ipython.
2. Debugging. I am just learning about the debugging features, as I am in the process of debugging an implementation of deleting from a Red-Black Tree. Links between nodes are transformed on the way done the recursion and then any violations to the rules are fixed on the way up the recursion. The tool lets me expand every node of the tree, see its color, and left and right children. I can't imagine doing this type of debugging in a text file.
3. Lots of features that make it easy to read code that is part of a big project. Easy to find definitions, dependencies, references throughout the project.ย
3. Saving sessions. I think this is what r0ml referred to when he said you can save an image. Still trying to get my head around his talk.
Text vs a workspace/image/running code. Lots of opinions on this around the web. Some examples:
Honestly, coming into visual studio/c# from emacs/common lisp feels like going backwards in time for me.
Running my CL environment on Gentoo feels like the future; a not-quite-there-yet-but-still-awesome future; running VS on Windows feels like kiddie toys that haven't gotten around to growing up yet.
And that's a weird feeling when you realize the dollars, time, and research poured into each environment. :-)
...ย
In Visual Studio you can have the disapearable side bars approach, the "old school mac" approach of different info windows floating all over the desktop, etc. With emacs you'd be restricted to doing that stuff via ascii art or popping up more windows with ugly ascii art in them.
...ย
> restricted to just text.
I think that lies at the heart of our disagreement. I don't find text restrictive, I find visuals and GUIs restrictive.
Meanwhile, I'm still trying to find my bug ... even though the debugger is great!
EDIT: Just found my bug and my program works! Nothing like being able to expand all nodes in a tree and see the big picture on a big monitor. And watch the recursion unfold (both up and down). All changes after each recursion are highlighted. Awesome.













