Python is the Arduino of software projects. It has a critical mass of libraries for anything from facial recognition and neural networks to robotics and remote sensing. And just like Arduino, I have yet to find the killer IDE for Python. Perhaps I just haven’t tried the right one yet, but it could be that I’m just doing Python wrong.
For Years I’ve Been IDLE
I’m a Linux-only type of a guy so using IDLE for Python is a natural fit. It’s in the repositories for super quick and easy install and there’s basically zero configuration to be done. Generally speaking my preferred development environment is text editor and command line compiler. IDLE is just one step above that. You get a separate window for the shell and each Python file you’re working on. Have IDLE run your code and it saves the file, then launches it in the shell window.
For me, there are two important features of IDLE’s shell. The first is that it keeps an interactive session open after you run your Python code. This means that any globals that your script uses are still available, and that you can experiment with your code by calling functions (and classes, etc) in real time. The second desirable feature is that while using this interactive shell, IDLE supports code completion and docstring support (it gives you hints for what parameters a function accepts/requires).
But simplicity has a tough time scaling. I’m working on larger and larger projects spread over many files and the individual nature of IDLE editor windows and lack of robust navigation has me looking to move forward.
The Contenders
I’ve tried perhaps a half-dozen different Python IDEs now, spending the most time on two of them: Geany and Atom. Both are easy to install on Linux and provide the more advanced features I want for larger projects: better navigation, cross-file code completion (and warnings), variable type and scope indication.
The look of Geany brings to mind an “IDE 1.0” layout style and theme. It’s the familiar three-pane layout that places symbols to the left, code to the right, and status along the bottom. When you run your program it launches in an interactive terminal, which I like, but you lose all IDE features at this point, which I despise. There is no code completion, and no syntax highlighting.
I have been using Atom much more than Geany and have grown to like it enough to stick with it for now. I’d call Atom the “IDE 2.0” layout. It launches with a dark theme and everything is a tab.
Atom depends heavily on packages (plugins that anyone may write). The package management is good, and the packages I’ve tried have been superb. I’m using autocomplete-python and tabs-to-spaces, but again I come up short when it comes to running Python files. I’ve tried platformio-ide-terminal, script, and runner plugins. The first brings up a terminal as a bottom pane but doesn’t automatically run the file in that terminal. Script also uses a bottom pane but I can’t get it to run interactively. I’m currently using runner which has an okay display but is not interactive. I’ve resorted to using a “fake” python file in my projects as a workaround for commands and tests I would normally run in the interactive shell.
Tell Us How You Python
It’s entirely possible I’ve just been using Python wrong all these years and that tinkering with your code in an interactive shell is a poor choose of development processes.
What do you prefer for your Python development? Does an interactive shell matter to you? Did you start with IDLE and move to a more mature IDE. Which IDE did you end up with and what kind of compromises did you make during that change. Let us know in the comments below.
“tabs-to-spaces”..
Just going to leave this here:
https://www.youtube.com/watch?v=SsoOG6ZeyUI
To become *Dr.Python*, you must use *Eric* *Idle*.
When people balk at the Arduino IDE I wonder why no one mentions UECIDE. I guess I’ll have to write something up for it. While in no way perfect, still miles ahead of the Arduino IDE.
I tend to lean toward Notepad++ (on Windows) and Kate (on Linux) for C++, Python and Javascript “development” (more like hacking). I do venture into IDLE for Python programming, and have also found PyCharm reasonable.
I am currently using MS VS Ent (student license) for a C++ project, and while I do NOT know how to use it to it’s full power/potential, I (as a hacker, not a programmer) find it frustrating that there is nothing I have seen on the market (I use the free stuff, so my view is myopic) that helps you to code. MS VS does well with hints, and the autocomplete sometimes helps, the IDE doesn’t seem to have changed a lot in the past 15+ years… Again, my view may be missing everything.
“symbols to the left, code to the right”
Here I am, stuck in the middle with yooouuu!
…sorry, I couldn’t resist the temptation…
I tried to like Python but I just can’t get past using indentation for scope. Finding out it’s a tab instead of four spaces makes unhappy.
you can also use blender as a python IDE, it has also video editing, 3d modeling/animation/rendering capabilities.
Vim / Emacs, Your move
Back in the old days, when computers were big’n heavy, there was EMACS.
Now computers can fit in your palm, they’re lighter and full of shiny graphics.
But at the end…
…at the end there is EMACS
I guess the micro Editor is modern cli editor with mouse and supports python.