Coming from a Visual Studio background, what do you recommend I use to start my VERY FIRST Python project?

Question:

I’m locked in using C# and I don’t like it one bit. I have to start branching out to better myself as a professional and as a person, so I’ve decided to start making things in my own time using Python.

The problem is, I’ve basically programmed only in C#. What IDE should I use to make programs using Python?

My goal is to make a sort of encyclopedic program for a game I’m playing right now, displaying hero information, names, stats, picture, etc. All of this information I’m going to parse from an XML file.

My plan is for this application to be able to run under Windows, Linux and Mac (I’m under the impression that any code written in Python works 100% cross-platform, right?)

Thanks a lot for your tremendous help brothers of SO. 😛

Edit:

I guess I should clarify that I’m looking for an IDE that supports drag and drop GUI design. I’m used to using VS and I’m not really sure how you can do it any other way.

Asked By: Sergio Tapia

||

Answers:

Good IDE for python are Komodo or Eclipse with PyDev.

But even Notepad++ or any other text editor will enough to get you started, since you don’t need to compile your code, just have a good editor.

The benefit of the above IDEs, is that you can use them to manage a large scale project and debug your code.

As for the cross platform issue, as long as you don’t use the specific os libs (such as win32api), you are safe in being cross platform.

Seems like a very large project for a first time. Is it going to be web based or desktop? Since it will greatly change your design and choice of python libs.

Answered By: Amirshk

Python is so simple that IDE’s aren’t as necessary as they are with C# and VB.

A "complaint" is that the Python IDE’s don’t do very much. This shouldn’t be counted as a complaint — it’s a virtue of the language.

We use Komodo Edit for professional work. It does much of what we need.

Answered By: S.Lott

I’d vote for Eclipse +pydev (especially that pydev extensions were released recently as open source). You can also use either VIM or emacs for python development.

Also, I’d recomment the great Dive Into Python

How about IronPython

As of VS 2010 it will become a first class .Net language

Or currently in a VS2008 shell IronPythonStudio

Not that I have used any of these

In hindsight this may not make for a very good cross platform solution, but it will allow you to leverage your VS experience

Answered By: Peter M

I think Wing IDE also deserves to be mentioned. I was a VIM user for years, but am currently thinking about changing to Wing. It costs money, but after evaluating for about a week (you can do a 30-day eval), I feel it will be well worth it.

I do not have any experience using the other IDEs (Komodo, Eclipse) mentioned. So they might be even better than Wing. It would be interesting if someone who has experience with all of them could describe some of their differences, strengths and weaknesses.

That being said, I recommend learning Python using a basic approach – use a text editor like Notepad++, VIM or emacs to learn the basics. Learn to use the standard Python debugger, pdb, from the command line. And use the interactive shell when learning (use IPython for interactive work).

Switch to an IDE when you master the basics.

There is also a very basic IDE in the Python distro: IDLE.

There are a lot of great tutorials and books on Python available. Start with the standard documentation. A lot of people like Dive into Python. I also recommend Python in a nutshell.

Answered By: codeape

Eclipse + Pydev is currently the gold standard IDE for Python. It’s cross platform and since it’s a general purpose IDE it has support for just about every other programming activity you might want to consider.

Eclipse is not bad for C++, and very mature for Java developers. It’s quite amazing when you realize that all this great stuff costs nothing.

Answered By: Salim Fadhley

I suspect you’ll have a hard time finding an IDE with an integrated GUI designer, I think. But most GUI toolkits have drag and drop designers you can use to design dialogboxes and windows, and then use from Python, even if it’s not integrated with the GUI. You’ll learn soon enough.

Here is a question asking for GUI designers for Python:
Delphi-like GUI designer for Python

Answered By: Lennart Regebro

I find SciTE to be a good alternative to Notepad++. It’s very lightweight, but has very good support for language highlighting, and in-editor script execution. It also has one of my favorite editing gestures from Visual Studio: Ctrl-F3, picks the word at the edit cursor, makes it the search text, and searches for the next occurrence.

PyScripter is the next step up IDE I would suggest, giving a nice class browser window, just like VS.

For interactive debugging, I use winpdb (which, despite the name, is not a Windows-only utility).

Answered By: PaulMcG

For dynamically typed languages power editors like Vim and Emacs make excellent IDEs. You can use GUI tools to make your layout and still use Vim/Emacs for development. Because there is no compile it is very fast to test your code e.g.

:! python % 

You don’t really need an IDE for Python; just a good text editor. An IDE you might like though is Editra. It is actually written in Python itself, so you can use it on Linux, Mac, and Windows! I used Editra as my Python IDE for about 6-10 months. It gives you all you need and nothing more: syntax highlighting, code folding, auto indenting, and optional plugins to integrate a Python shell right into the editing window. You’ll definitely want auto indenting when you are coding in Python.

As for designing GUIs visually, I suggest you check out Glade. It allows you to design GUIs easily with the GTK+ toolkit. (GTK+ GUIs work on Linux, Mac, and Windows!) It will take a bit more effort to integrate them into your Python programs than it does in Microsoft’s Visual languages, but it isn’t that bad once you learn it. The nice thing about using GTK+ and Glade is that you design your interface using containers, padding properties, and things like that. It is possible to design them dragging and dropping anywhere on the grid like in Visual Studio, but who wants to do that? Once you learn your way around containers and padding, you’ll be very happy with them. It’s much easier to make everything even, and to have similar widgets grouped together for hiding/disabling and things like that.

Good luck in your Python journey! 🙂

Answered By: linkmaster03

In terms of GUI editing, take a look at wxwidgets, and in particular XRCed.

XRCed is an application for generating interfaces (not quite drag and drop, but close) which are then saved as XML files. Using wxPython you can then load the XML file and it will rebuild the interface for you.

You then just need to obtain references to each of your UI elements (by name) and you can get on with the real work.

Answered By: Peter Gibson
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.