What's the state-of-the-art in Python programming in Windows?

Question:

I’m looking to set up my development environment at home for writing Windows applications in Python.

For my first piece, I’m writing a simple, forms-based application that stores data input as XML (and can read that information back.) I do want to set up the tools I’d use professionally, though, having already done a round of didactic programming.

What tools are professional python developers using these days? In order to have a working python environment, what version of the compiler should I be using? What editor is common for professionals? What libraries are considered a must-have for every serious python developer?

Specifically, which Windowing and XML libraries are de rigeur for working in Windows?

Asked By: Yes – that Jake.

||

Answers:

Lots of questions, most hard to answer correctly. First of all, most of python development happens on unix-like platforms. You will hit many walls during development on Windows box.

Python is not a compiled lanugage, current preferred version for production is 2.5. For environement setup you should take a look at virtualenv. Editor is a personal choice, many Python developers use Vim, you can customize it pretty well to suite your needs.

About libraries, Python is very strong around this area and it’s really hard to say what is a must to know. If you want to handle XML, I would preffer lxml.

Answered By: iElectric

“What tools are professional python developers using these days?”

Lots

“In order to have a working python environment, what version of the compiler should I be using?”

[“compiler” is meaningless. I’ll assume you mean “Python”]

We use 2.5.4. We’ll be upgrading to 2.6 as soon as we’ve done the testing.

“What editor is common for professionals?”

We use Komodo Edit.

“What libraries are considered a must-have for every serious python developer?”

We use Django, XLRD, PIL, and a few others. We don’t plan this kind of thing in advance. As our requirements arrive, we start looking for libraries. We don’t “pre-load” a bunch of “must-have” libraries. The very idea is silly. We load what we need to solve the problems we have.

Answered By: S.Lott

There are no set standards in these matters, and for good reasons:

  • there is a fair amount of good choice
  • different people are productive with different tools
  • different tools and libraries are suited for solving different problems

That said, I think it’s a valid question exactly because there is a fair amount of good choice. When there is too much choice people often do not chose at all and move on. You still need to do your own research to decide what is best for you but you may find here some good starting points.

Here is what I use professionally on windows:

Answered By: Toni Ruža

I like Eclipse + PyDev (with extensions).
It is available on Windows, and it works very well well. However, there are many other IDEs, with strengths and weakness.

As for the interpreter (Python is interpreted, not compiled!), you have three main choices: CPython, IronPython and Jython.
When people say “Python” they usually refer to “CPython” that is the reference implementation, but the other two (based, respectively, on .Net and Java) are full pythons as well 🙂
In your case, I would maybe go on IronPython, because it will allow you to leverage your knowledge of .Net to build the GUI and treating the XML, while leaving the implementation of business logic to Python.

Finally, should you decide to use CPython, finally, there are several choices for working with xml:

  • minidom; included in the standard library
  • lxml, faster and with a better API; it means an additional installation on top of Python.
Answered By: rob
  • If you go for CPython, make sure you get the win32 extensions by Mark Hammond, either as a separate download which you install on top of the vanilla Python installation, or as part of ActiveState’s ActivePython. It includes an integrated editor and debugger.
  • Jython has recently reached 2.5 compliancy, but we quickly ran into recursion limit issues.
  • The standard distribution includes IDLE, a graphical editor and debugger.
  • I like shells, so I’m using IPython for interactive work, and pydb as debugger (unfortunately, I had problems getting pydb to work under Windows).
Answered By: ThomasH

Taking the headline question literally, the answer has to be IronPython. The 2.0 releases are equivalent to CPython 2.5, and the 2.6 release (currently at beta2) is intended to match CPython 2.6 (full 2.6 release some time in the next couple of months). With either you can use the state of the art in Windows GUI frameworks, i.e. WPF; and you get the whole .net XML support libraries (excepting Linq to XML, which relies on clever bits of C# that IronPython cannot yet emulate).

I’ve used NetBeans Python plug-in happily as an IDE for IronPython using WPF.

Answered By: Steve Gilham

The answer would depend on what you want to do with Python. If you want to do web programming, Python is blessed with many web frameworks. The most popular ones are: Django, Pylons, and Turbogears. There’s also Google App Engine, where you can deploy your Python webapp (based on GAE framework) to Google’s infrastructure. If you want to do Desktop programming then there is PyQT and TkInter, or you can even try using Java Swing with Jython. And if you want to do Mobile app programming then there is Python for S60 which is backed by Nokia.

Python is interpreted language, so there is no compiler (although the interpreter also compiles your python module into bytecode). I would recommend using Python 2.6 as it has some syntax and libraries that is different compared to 2.5. You can also start learning Python 3.0 too.

There is several IDE that is good for Python. You don’t have to get yourself attached into one editor/IDE because most of them are good ones. For the commercial ones there is WingIDE which is really focus on making IDE for Python and I would really recommend IntelliJ IDEA with Python plugin which is really nice if you often look at the libraries in your Python environment. For the free ones (as others have said) there is Komodo Edit or you can also try Netbeans with Python plugin.

As for the must-have libraries, this is depending on what you want to do. What kind of application you want to develop with Python. But I think every Python developer should consider PIL for imaging library. I also use simplejson quite often, because I prefer using JSON rather than XML. If you are using XML though, you can use lxml as it is really fast in parsing XML.

Answered By: Joshua Partogi
Categories: questions Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.