views:

24945

answers:

32

I am just getting into Python development and would like to know which single IDE or editor is the best.

I mainly use Linux, but don't let that stop you if you think the best one is Win/Mac only.

+4  A: 

You might want to look at these related questions.

My take:

On the mac I use Textmate. It has a project system (the missing drawer plugin makes it much nicer, IMO), and many neat Python-specific features for highlighting, commenting/uncommenting, etc. not to mention snippets which you can automatically insert for common tasks. (The one thing I haven't been able to get to work properly is code folding).

On linux I stick with vim but that's just because I'm used to it-- personally I don't know if it would be worth the steep learning curve otherwise since I spend most of my time on the mac. Other more full featured IDEs (eric4 for example, or SPE) tend to get in my way more than help. They have tons of useful features, but it all depends what one is used to.

dF
Code folding isn’t currently supported for Python in TextMate (version 1.5).It is currently unknown whether version 2 will support folding for Python, or when it’s coming out. (That’s what a guy called Allan said in the ##textmate IRC channel just now, and I think he wrote the app.)
Paul D. Waite
eric and SPE... talk about making a grown man cry.
Jason Baker
+11  A: 

This question discusses various text editors and their pros and cons.

I think a text editor is fine for Python and there's no need for a fancy IDE. Personally, I use Emacs which has excellent Python support but learning Emacs is a job in itself so probably not the best thing to do at the same time as learning a new language.

Dave Webb
+1  A: 

I think a simple text editor like notepad is all you need for python, I've never seen a need for a grandiose IDE. Given that, however, I am a big fan of Notepad++, which I use as an all around better replacement for notepad, including editing python.

I'm also not sure there is such a thing as "the best" when it comes to IDEs, most of the differences come down to preference.

dwestbrook
A: 

You don't need a fully blown IDE for python! just something with syntax highlighting and sensible tab / indentation support.

If you can set it up so your script is run from your editor that's nice too.

I use KDE's kate under Linux, and pythonwin (part of the activestate python package) under windows, but the default IDLE is fine too...

Thomi
+7  A: 

Not an IDE, but can actually replace one:

iPython, the enhanced command line shell for python that allows you write and run python interactively, has help, profiling, debugging and syntax highlighting built-in, and lets you manage your history of commands and log them to text files so you eventually can get a .py out of what you did in the shell. You can also save and restore your session or just part of it.

It also supports *nix filesystem operations from inside the shell and supports your environmental EDITOR variable for larger edits.

Check out these video tutorials: A Demonstration of the iPython Interactive Shell

Sergio Acosta
is there a way to edit/write programs with ipython?
Seun Osewa
@Seun, yes, type `%ed foobar.py` at the ipy prompt to edit an existing script, and `%ed [13]` to edit (and rerun) the 13th command issued in this currrent session are two simple examples.
matt wilkie
+13  A: 

If you are looking for a more professional python IDE, I think Komodo from ActiveState is the best alternative.

It costs $300 USD, though.

There is a free light version called Komodo Edit that offers basical editing of python files.

Sergio Acosta
Komodo Edit does more than just basic editing; I find that it's more full-featured than some paid-for editors... Anyways, it has Emacs bindings (meh) and vi emulation (yay!), which I find to be one of its coolest features.
Xiong Chiamiov
If you get the free Komodo Edit be sure to check out the add-ons. There are a few useful ones like source navigator, file diff and todo lists.
Nick
+19  A: 

I use Vim for python. The default configuration may not suffice so some modifications and plugins are needed. I used this blog post as a starting point. Also a search on Google for this returns good results.

Recently I also heard about eclim which brings Eclipse functionality along with python support to Vim. It uses a server script to provide an interface between Vim and a headless Eclipse instance.

Turker
You blog link doesn't work.
Daniel
You mean http://blog.sontek.net/2008/05/11/python-with-a-modular-ide-vim/? It seems to be working at the moment.
Turker
Not sure why this is moving so much, I think it's here now: http://www.sontek.net/Python-with-a-modular-IDE-(Vim)
Ben Gartner
I'll try reposting @Ben's link so that the parsing works: [http://sontek.net/Python-with-a-modular-IDE-(Vim)](http://sontek.net/Python-with-a-modular-IDE-(Vim\))
intuited
Got it to work by both backslash-escaping the `)` at the end of the URL and giving it as a full inline link. Note to self: never put parentheses in URLs. They also would have accepted http://sontek.net/Python-with-a-modular-IDE-(Vim%29
intuited
+2  A: 

If you are in any way interested in or already using vim I suggest Pida. Pida is an IDE with several useful features for managing projects that uses vim as its editor.

I'm not really sure how active the project is, but it I have used it for some time without many problems.

whatintheworldisthat
+36  A: 

Eclipse and the PyDev plugin are nice together. I used Emacs but being a .NET-developer from the start, I'm so used to a rich and powerful IDE that it simply wasn't enough. Eclipse met my needs and I like being able to run it on my Windows, OS X and Linux machines.

Microserf
Pydev is now being sponsored by Aptana so it should go from strength to strength: http://www.aptana.com/python
johnstok
I find eclipse to be very buggy... seems to crash on me all the time
jle
Never had a crash with eclipse here.
Ikke
Eclipse with PyDev never crashes, is very scalable for programs as they get large, allows you use Subversion from right within your IDE, has a good built-in debugger, analyzes your code as you type it, and has a whole plethora of great keyboard shortcuts.
Steven Hepting
You can go back to previous versions of local history, you can compare files with an excellent graphical diff viewer, you can keep track of your source-code tasks with Mylyn, you can have any TODO or FIXME tags in your comments automatically turned into tasks.There are keyboard shortcuts to insert lines below the one you're on, to delete the whole line, to comment/uncomment whole blocks of text, and even to show where a particular method/class you have highlighted is defined (that one is particularly useful for unfamiliar codebases).
Steven Hepting
I've never heard of anyone calling emacs 'not powerful' enough!
Sanjay Manohar
Eclipse is like gouging your eyes out with a spoon (very painful) its not a fault of pydev that its a fault of eclipse which I find to be a terrbile platform :) </hate>
krystan honour
A: 

You may be interested in CodeBlocks though I have no idea if how it deals with any features of the features you'd expect from an "IDE" (code completion, object/class lists) vs. a simpler syntax-aware text editor-- I just know it supports syntax highlighting for Python and has some decent builtin wxWidgets RAD tools which may help if your Python project uses wxPy.

Loren Segal
+11  A: 

PyScripter. It has auto-complete and unit testing support.

If you are coming from Visual Studio background, you will find that the layout is similar to VS in that it also has a project workspace.

Ngu Soon Hui
A: 

I use Eclipse with Pydev plugins. Debugging and refactoring is quite easy. Also there is the possibility to run your script in command prompt inside Eclipse as well.

Eclipse with Pydev is good if you are used to traditional IDEs, where you spend whole your working day in, because it has a lot of additional plugins for version control, database browsing / editing, etc.

edgars
+2  A: 

I agree with Turker's recommendation of Vim/MacVim/gVim and this tutorial. Check out OmniComplete+SuperTab - that was the deal-maker for me.

agentj0n
+2  A: 

SPE is my choice, but I've only tried IDLE, Wingware, and Komodo.

SPE is free, it does color syntax highlighting, auto-indentation, syntax checking, and pretty much everything I need.

My advice would be to try SPE or PyScripter, and catalog your dislikes, if any (unless you need to spend $ for 'professional' support -- in my experience, that's pretty much not needed.) Once you have a catalog of deficiencies, you can move on.

"Best" is probably an ephemeral goal.

Gerry

Gerry
+7  A: 

I really like Komodo Edit, which you can get from www.openkomodo.com.

Startup times are pretty bad but once it is up and running its great.

Jay
I used this for a while but seems to hang alot...
Stormenet
A: 

I'm less into GUI and more into text-editor. I prefer jEdit. I have used SPE and find it good. I also have used nano on linux/solaris and that works fine too.

Christopher Mahan
+2  A: 

Seen no mention of PythonWin yet. I find it really useful for quick Windows scripts. Great for accessing Windows COM in management scripts (using Tools / COM makepy utlity).

For Linux, I'd like to mention PyCrust, which is now part of wxPython. If you don't mind wxWidgets on Windows or Mac, PyCrust is a cross platform editor / IDE.

gimel
that and PythonWin doesn't crash all the time like eclipse does...
jle
+2  A: 

whatintheworldisthat: PIDA is very active at a few hundred commits/week at the moment.

Ali A
We need a release of PIDA! I think PIDA is awesome, but right now, is difficult to install from hg. The last release was in July 2007. Please release often!. :)
Manuel Ceron
Manuel: Help accepted! We are trying as hard as we can. We are quite close to 0.6.
Ali A
+3  A: 

If you are familiar with either vim or emacs or is very determined to learn to use either then thats probably the best choise. Otherwise its probably saner to use Eclipse, Komodo or some other IDE.

I prefer vim ever since I started using it a decade ago. It exists on every platform, its fast, it has all the features you can think of and much more. Since I live mostly in *nix-environment with terminals I use it all the time for all filetypes. But as stated earlier, its a steep learning curve and there is some configuration needed to get it really usefull. And of course you need to like the terminal feeling to choose the path of vim.

UlfR
A: 

I use Kate for all my development. It is a simple multi-document editor which can be picked up real fast and be used comfortably from day one. (I have tried many other options, both IDEs and editors)

muhuk
A: 

On the Windows platform, the Zeus IDE has support for Python.

It does the standard stuff like project workspace management, integrated version control, code folding, syntax highlighting, Python smart indenting etc etc.

Also Zeus keyboard macros can also be written in Python, meaning Zeus can be reconfigured using Python.

jussij
A: 

Many people seem to like Geany which is available on Linux and Windows. Also Eclipse with the PyDev extension is popular (see EasyEclipse for Python for pre-packaged bundles of these tools).

Personally I like to use a decent text editor, like jEdit, in conjunction with a couple of terminals / cmd windows open in the background.

Regards,
Wayne Koorts
Blog: http://www.wkoorts.com

Wayne Koorts
+2  A: 
Cyberdrow
+1  A: 

Here is a similar discussion with feature comparison table.

husayt
+2  A: 

this is a duplicate question. :/

Decio Lira
+3  A: 

PyDev for Eclipse is pretty decent, but I prefer the Python plugin for NetBeans. I never used to like NetBeans, but 6.5 is fast, coherent and has a clean UI. I much prefer it to Eclipse.

Matt Olenik
+4  A: 

definitely Emacs!

it serves good as

  • a Python editor,
  • a subversion (or cvs) client (with beautiful ediff)
  • a container of buffers in which you run Python
  • a container of buffers in which you run your favourite shell

if you're just starting with Emacs, download and print a cheat sheet (look for refcards).

if you don't want to learn using Emacs, Eclipse would be my second choice.

mariotomo
A: 

I'm very skeptical about questions asking for "something that's the best". In your context, you have to try a couple of editors (if you didn't do that already) and stick to the one that suits you best. If there would be a "best" editor, everyone would be using it exclusively.

Anonymous
+1  A: 

As I've not seen it mentioned yet, let me suggest Editra. It's free, open source, and has python autocomplete working right out of the box, without jumping through all the arcane hoops that others (vim for example) make you jump through.

It also doesn't have the annoying "please register" popup that you get every few minutes from the pydev plugin to eclipse.

Brent
+1  A: 

gedit is great in linux. Best to enable some plugins for the best experience though:

  • snippets
  • code comment
  • python indentation (3rd party, for auto-indenting)

There are other helpful plugins, but I find these to be particularly great for python.

+1  A: 

I am used to MATLAB and am relatively new to Python. There are so many answers to this question it makes choosing very difficult. I spent a month or so trying various options. I have tried IDLE and an editor (eg. Scite, Notepad ++). Too primitive for me but I guess it works. Then I tried Spyder. This was horrible. No debugger and the interactive shell ran horribly slow (like 10 secs for a response) as soon as it got a bit of data in the memory. Then I tried Pydev with Eclipse. Hated it. Long learning curve and silly things like having to hit enter in the debugger twice in the shell. Then I tried WingIDE. What a breath of fresh air! It was easy to use from the beginning. Things were just intuitive. The professional version puts the MATLAB debugger to shame with conditional breakpoints but even the personal version is wonderful. I cant comment on the others but of the ones I tried WingIDE was easily the best for me.

Andrew
+2  A: 

PyCharm from JetBrains is pretty awesome refactoring, django support, code completion, syntax highlighting etc. Its in beta at the moment but still worth a try. All of their editors are very slick, I use resharper for C# at work, also from JetBrains.

Sorry if I sound like a fanboy :)

Ed

Ed Bishop