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.
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.
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.
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.
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.
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...
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
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.
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.
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.
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.
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.
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.
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.
I agree with Turker's recommendation of Vim/MacVim/gVim and this tutorial. Check out OmniComplete+SuperTab - that was the deal-maker for me.
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
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.
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.
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.
whatintheworldisthat: PIDA is very active at a few hundred commits/week at the moment.
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.
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.
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
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.
definitely Emacs!
it serves good as
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.
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.
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.
gedit is great in linux. Best to enable some plugins for the best experience though:
There are other helpful plugins, but I find these to be particularly great for python.
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.
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