views:

2833

answers:

14

So I've got plain python downloaded, so I can run .py files from the command line. Now I want to step it up, have a debugger, be able to call .net or other Windows things, etc...

What's my next step? What's a good Python environment for Windows?

+4  A: 

You may do well with IronPython, which gives you Python for the .NET environment. It probably integrates with the Visual Studio debugger and everything. (I don't use Windows for dev these days, so I haven't tried it.)

Greg Hewgill
Ironpython link updated to [http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython][1] [1]: http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython
Anthony
+10  A: 

Try Eclipse with the "pydev" plugin PyDev

Eclipse

darkdog
+5  A: 

Install ipython instead of the default interpreter shell. Will save some time in various tasks.

cnu
What about Python 3?
Selinap
+3  A: 

I like Pythonwin, part of Python for windows extensions. It has an interesting autocomplete facility.

Mark Cidade
+1  A: 

The Visual Studio extensibility SDK also comes with a compilable IronPython integration package.

Mark Cidade
+11  A: 

ActivePython and Komodo IDE seems to be a popular combination. Personally I use Cygwin and Komodo Edit, but then I don't do much interactive debugging on my Python scripts.

Anders Sandvig
+1 for Komodo IDE, if only for the debugging support. It's expensive though if you can't get your work to buy it for you. I can't recommend the free Komodo Edit though - too was much taken out.
Scott Griffiths
A: 

Boa Constructor is a lightweight IDE made in Python (open source and freeware). It's oriented as a RAD tool, with a GUI designer based in wxPython.

It may not be the best environment for Python (I suppose either Eclipse+Pydev and IronPython have far more features), but it does the work without much bloating.

PabloG
+2  A: 

I spent a year doing Python development and was thoroughly underwhelmed by all the popular IDEs. However, I stubled onto Wing IDE by accident and as it happens, it is pretty good! The development is active and it has a mailing list that the developers very actively participate in.

The IDE is nice and very responsive. The text editor could use a few improvements (I am maybe spoiled by Visual Studio) but the feature set is quite nice. It also offers the best code completion support for Python I have ever seen. Oh, and I especially liked the remote debugger capabilities! The system I was working on was far too complex (or rather, too unmanagable) to run on developer machines, so before Wing all debugging was done by the print-statements-everywhere method.

It is the only Pthon IDE I recommend. I used the professional version, by the way.

I have not tried IronPython, though.

Sander
+5  A: 

By environment, I take it you mean IDE. I've tried a few IDEs and editors, pretty much in the order I'd rate them:

  • Eclipse with PyDev. Nicely layed out GUI with syntax parsing to show errors, debugger and unit testing facilities. Easy to browse and edit large projects.
  • Eric - Written in PyQt. Nice environment
  • IDLE - I used to use this a lot. It has useful fns to look up functions in Python libs etc. It seemed like it wasn't being actively developed though.
  • Komodo. Nice editor, seems quite focussed on web development.
  • SPE. Lots of useful functionality although sporadic development. Works well with Blender.
  • Boa Constructor - IDE written in Python using wxPython. Good for generating wxPython GUIs quickly but has a major downside in that it parses the Python code to reload your project, and this breaks between wxPython versions.
  • PythonWin Editor - Comes as part of the Python win32 extensions, or with ActiveState ActivePython install. Has simple debugger. Useful for quick editing.
  • DrPython - Pretty basic, but functional editor.
  • SciTE - Simple text editor from which you can launch scripts and see the output. No debugger. Useful for quick editing.

More are listed here: http://wiki.python.org/moin/PythonEditors. I've settled on Eclipse because it works on Win, OSX and Linux (and I use all three) and because it scales well for larger projects.

You might also try PythonNET. I think this may have been superceeded by IronPython though.

If you want to run Python commands in a graphical environment you might try PyShell and PyCrust

Nick
+4  A: 

PyScripter. In my opinion one of the best windows only Python IDE

A: 

Go for eric ide if you want eclipse's cross-platforminess without all the weight of a full enterprise level ide..

jilles de wit
A: 

Wing IDE for the win. I was recommended it by some of our Visual Studio developers and it hasn't done me wrong. The code completion is pretty useful if you're new to Python.

Here's a great review of some of the popular IDEs:
http://stackoverflow.com/questions/17489/best-environment-for-python-on-windows

I tried out both trial versions of Komodo and Wing. I ended up with Wing because of its stronger code completion and cheaper price tag.

That links to this post. Maybe you wanted this one? http://stackoverflow.com/questions/60784/poll-which-python-ide-editor-is-the-best
jcoon
+3  A: 

Given the nuances of your question, this probably isn't the answer that the OP wants to hear, but just in case anyone else with different sensibilities is reading this: I recommend using Vim or Emacs, coupled with other tools like ctags - yes, even for Windows development.

I have an anecdote to support this:

At work I do IronPython development, developing a .NET product on Windows only. We let developers choose their own IDEs, so like the stereotype of herded cats, everyone chose a different one. This was fine.

We also pair program. We change pairs every day. (call us crazy, iet works really well for us) Doing this means we are all exposed to a large number of different IDEs, and get to use them, hands-on, with an expert user of that IDE sitting by our side, 8 hours a day, every day.

This means we have all become quite proficient and knowledgeable about many different IDEs. After a while, some of us saw the good aspects of other IDEs that we didn't appreciate before. People started switching, using on their own Desktop an IDE that they had grown to appreciate through using it while pairing with somebody else.

You can tell what I'm going to say: After a year or so, almost everyone in the office now uses Vim or Emacs. (Exceptions: One guy uses Wing. One guy has steadfastly stuck with TextPad throughout.)

My interpretation of this is that Vim or Emacs are palpably better than integrated IDEs - but you do have to figure them out, and one way of doing that is to work side by side with someone who knows them. This is an example of pair programming spreading knowledge.

Oh and if you use vi with python, the pyflakes.vim plugin is fabulous.

Best regards.

Tartley
+1  A: 

You can use Netbeans and Python plugin with these features :

  • Code completion
    Code completion is available for :
    • Modules available for imports
    • Imported symbols
    • Local variables
    • Other known classes and functions
    • Keywords
  • Smart Indent, Outdent, and Pair matching
  • Editor Hints
  • Code Folding
  • Folded code
  • Semantic highlighting
  • Instant Rename
  • Mark Occurrences
  • Refactoring
  • Debugger
  • Platform Manager
  • Code Coverage
  • ...

To get the latest development builds of the Python IDE, see the How to install page.

SjB