I’m keeping a more thorough accounting of my journey through learning Python (which I’ve opted to learn at the same time as Ruby on Rails—I must be out of my mind) for personal blog entries. Being new to these languages, I first started learning by simply using Notepad++, but quickly found it tedious. I assumed others here on ChurchMag might be in the same boat, so undaunted, I went in search of an integrated development environment (IDE) for Python.
That’s when I discovered Ninja-IDE.
It’s really no secret professional developers cling to their favorite integrated development environment (IDE) with almost religious zeal. Personally, I’m not too picky. I prefer four key parts to my IDE:
- Runs on multiple operating systems
- Easy set-up
- Code completion
- Rich text-editing and manipulation features
When I first dug around looking for a good Ruby on Rails editor, I heard a lot of hooting for Aptana’s RadRails. That seemed like overkill for learning purposes, so I settled on SublimeText 2, instead.
So Comes Ninja-IDE
When it came to Python, however, the answers and opinions were as varied as all of the forums I trolled. One consistent theme seemed to be, however, don’t use IDLE—the integrated shell GUI and editor that comes with the Python installation routines. Then one obscure post caught my eye about an editor called Ninja-IDE, which is a recursive acronym for “Ninja-ide Is Not Just Another IDE.” Cute, eh? Intrigued by the website, I downloaded and installed it immediately. (Note: The instructions for the Windows installer looked like they were maybe in Spanish or Italian—don’t let that phase you.) I was greeted with this screen upon opening it:
Now I don’t claim to be a Python expert by any stretch, neither would I attempt to claim an expertise in all the IDEs available for programming in Python. I am, however, a veteran programmer. I feel Ninja-IDE showed great promise for all the reasons I cited above in my introduction. Ninja-IDE includes compatibility with the following OS platforms:
- Linux Ubuntu/Debian and Fedora
- Windows XP, Vista, 7
- Mac OsX (Lion & Snow)
- Source Code (for any OS) available via GitHub
Next, I added a new script by clicking the top icon to the left. This was immediately intuitive to me. I then typed the following code, purposely leaving out some basic syntactical items or using non-standard conventions (such as no space between my string elements in the phonetics list):
To my complete amazement, it ran the script but it did highlight through the yellow squiggly lines all of the syntax errors. It also threw a debugging message “IndentationError: unexpected indent.” Of course, the exception was thrown not because of the indentation (which is actually correct for a statement block in Python 3.x), but because I omitted the colon after the “for p in phonetics” statement. By hovering my cursor over the statement in file, I got a “syntax error” message, making the debugging experience even richer!
Finally, I fixed all of my errors and ran it again. The results were pretty with no errors and nice, vibrant (in Lime color) “Execution Successful” message.
Just for my own satisfaction, I then clicked the terminal button and found myself at the Python terminal prompt. On a whim, I ran the exact same code and got the results I would expect to see if running Python from a command prompt, or IDLE (or within PowerShell, as one instruction book on Python suggests). Here are the results:
Summary
All told, I’ve had great experiences using Ninja-IDE. Thus far, it appears to have all the things I like in an IDE, and it’s simplistic enough for learning Python as well as serving a number of professional development needs. So my recommendation is to go to http://ninja-ide.org/ and get the tool for your own use. Especially if you’re a newcomer to Python.
God bless and happy coding!
Raoul Snyman says
I’ve used Ninja-IDE, and it’s a fairly decent IDE. There are some things that really annoy me about it though (I’m a Linux user, and it doesn’t seem to like to be friends with my desktop) so I don’t use it, but it is one of the IDEs that doesn’t suck too much.
All IDEs suck, though some suck less than others. Another IDE you can try is Eric, but it takes a little getting used to.
In my opinion, the IDE that sucks the least is PyCharm. Unfortunately PyCharm is a commercial IDE so it only has a 30 day free trial, but they do offer open source projects a free license (which I picked up for my OpenLP project).
Also, if you’re learning Python, I highly recommend using “A Byte of Python” – a free e-book. Just Google it for the link.
Eric Dye says
#protips
Philippe says
I’m tried NinjaIDE and found it very annoying. Indentation is heavily bugged for else: and except: and will mangle your lines. Also when looking for a keyword in a file it will look for the same keyword in other open files. This is maddening when you’re writing one bit of code in a file and looking at another for reference.
Eric Dye says
Great feedback, Philippe, this helps a bunch. Thank you!
Richie says
I use Ninja-IDE, Geany, and PyCharm…Of course , I prefer PyCharm than the others. But PyCharm is way too heavy for my old computer. So I choose Ninja-IDE, it’s a much much faster. Now I use Geany and Ninja- IDE both at doing my project on Python