X

Eclipse+PyDev vs PyCharm

Intro

Contents

So, for a long time I’ve been a vim user (sorry, I have to say it, it makes me proud) but sometimes using VIM is a bit harder, not because of the editor which is evolving on a more powerful editor (neovim) but for the lack of plugins, sometimes plugins that don’t behave well or that can’t do what Pydev+Eclipse or PyCharm do, then, sometimes I have to use one of those, which one is the best?

I have no idea, to me it depends on what you want to do.

For a great part of this year I’ve been using PyCharm because a friend told me that it would help me to write better code, and is true, the active syntax check in PyCharm just works, it is great and gives you clues while you are writing about what you are doing different to what the pep8 states. The editor is quite fast and the autocompletion is good.

PyCharm comes from IntelliJ, the complete suite is based in Java but is quite fast, it have a lot that comes from the other IntelliJ IDEs, including the bunch of plugins that helps you to work. It have support for GIT/SVN out of the box, but other code managers require you to buy the Professional Edition, that is also required for “web development” in PyCharm, meaning that Django is not supported by the Community Edition (A.K.A. the free edition).

Again, that I liked a lot was the code formatter, it just works and in my opinion fixes more issues than any other I’ve tried, including autopep8.

What I like:

  • The syntax check
  • The Source formatter (after you wrote the code)
  • When using a software control manager, if you add a file it asks you if you want to add to the control system.
  • Looking for files in the file explorer is quite easy.
  • There is a battery mode that reduces the functions to extend the time on battery.

What I don’t like

  • The Professional version is way too expensive for a company but useful for personal use.
  • Does not support Django in the community version.
  • It can put your CPU to work when doing the syntax check.
    • Fortunately there is a battery mode.

If you are developing a Django app and wanna put into production, please, don’t hesitate and use a VPS from Digital Ocean, use this link and get $10 for your VPS, that’s 2 months of the $5 USD VPS! https://m.do.co/c/cb6fcac2998c

PyDev is the other one. By itself it does nothing, it is a plugin that you need to add to an Eclipse Installation. I used it a lot several years ago, then I left it on the side because I needed to work with large files and (like most editors) it gets slow with large files (like >10000 lines), I used vim for that.

But now I’ve been using it and I like the way it evolved. The debugger is still there and I love it, to debug Python is the simplest way to step through your program. Like going inside of the function, check variables, multiple variables, at the same time, not just “p object”. It’s super easy to use the debugger there.

And, it also supports Django out of the box. So you can just create a Django Project, and then a Django app, and start working, the autocomplete is pretty good although sometimes modules with the same name in several packages can give a hard time, but just pay attention to the autocomplete.

PyDev uses pylint as the syntax check utility, you can switch to another variant but it has to be pylint compliant, I mean, use the same output, like using python with the pylint module and not directly the pylint executable.

Since PyDev runs on eclipse you get the benefit of using eclipse, a HUGE, but HUGE amount of plugins out there, support for GIT/SVN/Bazaar/Mercurial etc, with just some clicks, add the repo and install. You can also have other languages like Ruby, JavaScript, etc.. with just a few clicks, no “Professional” version is needed, but if you want to cooperate with the development of PyDev then you can use the version of Eclipse developed by the PyDev developer: LiClipse, which includes all you need to do Python developing (including HTML editors and all that stuff).

One of the thing that I like in the Django support is that making migrations and apply them in the development environment is quite easy, just a secondary click over the project folder, then go to the “Django” submenu and “manage.py makemigrations” or “manage.py migrate”. It saves you a lot of time when doing model updates.

Also there is a “Python” submenu with some Python things to do, like removing all the byte-compiled files or formatting all the python files in the project.

What I like

  • The eclipse you know, with all the plugins you know
  • Works with Django out of the bog
  • The fucking debugger!!!
  • Syntax check with Pylint (which you can configure)
  • Import sorting and fixing (removing unused imports)
  • Source formatting for when you have done writing, a little help to get the code prettier, or probably you just want to prettify an old file.

What I don’t like

  • The Source formatting could improve, like adding a default docstring to classes and methods/functions
  • It lacks of support for flake8.

If you are developing a Django app and wanna put into production, please, don’t hesitate and use a VPS from Digital Ocean, use this link and get $10 for your VPS, that’s 2 months of the $5 USD VPS! https://m.do.co/c/cb6fcac2998c

The Winner

So, as I’ve said, it depends on what you need to do, is something quite subjective. By now I’m developing in PyCharm Pro because I’m using Django by the moment, and its just 8 USD a month in the personal account.

If you are developing a Django app and wanna put into production, please, don’t hesitate and use a VPS from Digital Ocean, use this link and get $10 for your VPS, that’s 2 months of the $5 USD VPS! https://m.do.co/c/cb6fcac2998c

marco: Software Developer, Python lover and a Free Software enthusiast