Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Best Free Python Editor?
38 points by _bxg1 on April 25, 2020 | hide | past | favorite | 58 comments
I recently started working in Python and reached straight for VSCode, because it's been so great for other languages. But its Python plugin is... extremely underwhelming. MyPy/Pylint checks don't run until you save, take several seconds, and don't even place the underlines in the right place; they all end up at the start of the line. Autocomplete support is minimal.

I know PyCharm exists, but is there a free editor that does a better job than VSCode?

Edit: Excluding text-based editors (vi/emacs); I'm not a fan



I would recommend PyCharm Community Edition. If you're doing web development you will be missing a few nice to haves but the experience otherwise is virtually indistinguishable from the professional edition.


The Community Edition is also open source.

https://github.com/JetBrains/intellij-community/tree/master/...


I assumed it had a "non-commercial use only" license, but looks like it doesn't! That could be perfect.


I use pycharm daily and have nothing but praise for it. The free edition will probably take you very far, if you want the database features of the paid version there's always DBeaver


Same here, I'm typing that while having it running in the background along with CLion. Some of us benefit from a free license to their entire toolbox via the work on Colour (https://www.colour-science.org/). Their support has been helping us for over half a decade.


Make sure that your VSCode is set up correctly - I'm not experiencing any of the problems that you're describing.


I don't have the exact problems, but I find similar but different problem with both MPLS and Jedi in VSCode, plus VSCode recognizes virtualenvs and tries to use dev support tools like black or mypy from the project venv, but if it's not there it does a user install, which it then still fails to locate.

Still, using VSCode for Python is better than using a different editor just for Python, but it's frustrating that so many basic things are almost, but not quite, fully functional.


I'm using the official Python extension, made by Microsoft itself.


Did you add Microsoft's Pyright[0] extension as well?

It works hand-in-hand with the Python extension and makes VS Code a fantastic Python editor IMO. You may want to set pyright.disableLanguageServices in settings since there is some overlap in the Pyright and Python extensions that can result in duplicate results. (I'm not sure if you lose any Pyright features when you do this though...)

[0] https://marketplace.visualstudio.com/items?itemName=ms-pyrig...


No, I didn't know about that one; the base one has MyPy and Pylint integration so I assumed it was the best version of each that they planned on implementing. I wonder why they would break out the "good version" into a separate extension.


I've always found pylint to be pretty useless... see for example https://lukeplant.me.uk/blog/posts/pylint-false-positives/

I always pip install flake8 in my venvs and the standard Python extension can also use that just fine:

    "python.linting.pylintEnabled": false,
    "python.linting.flake8Enabled": true,


It's what we use at my workplace; not my call to make


Just tried Pyright and it's incredible. Wow; why in the world don't they include this functionality in the regular extension? Thanks so much!


That's the thing. VSCode itself is quite good but all MS made extensions I tried are just garbage.


The TypeScript integration is incredible. It's as good as a paid IDE. Python is the only other first-party extension I've used, though.


Notepad++ is a good tool. It knows python and mostly gets out of your way. Its not an IDE but has a lot of related functionality. But I certainly edit all my python code with it.

Then again, I use command line tools for linting etc. so I don't need a lot built-in to the editor.


The free version of PyCharm is great.


It's been a couple of years since I wrote python seriously, but MyPy/Pylint annotations were showing up nicely in emacs, IIRC.


Emacs has been working for me for several years now.


> Excluding text-based editors (vi/emacs); I'm not a fan

How about both together? => https://www.spacemacs.org/

The git integration under https://magit.vc/ alone is worth the price of admission.


I do a lot of Python development, both at work and for fun at home. Can’t recommend Sublime Text enough.


I actually can’t use anything other than sublime. Nothing beats its simplicity and lack of complex buttons.


And speed


anaconda package really helps get a lot more ide functionality in Sublime Too


PyCharm Community Edition is open source, free and great.


I came here to mention PyCharm.

Note that PyCharm also has a VIM plugin that is the best VIM plugin I've used on any editor. It does 95% of what I would do in real VIM.


Vim with coc-python works very well for me: https://github.com/neoclide/coc-python

“Built with rich support for the Python language (for all actively supported versions of the language: 2.7, >=3.5), including features such as linting, IntelliSense, code navigation, code formatting, refactoring, snippets, and more!”


Nvim + Coc (either MPLS or Jedi, both work good), way faster, and definitely worth the learning curve if you're new to modal text editors :)


I'm curious what you switched from that is giving you FOMO right now. If you've mostly worked in strongly-typed languages, you simply can't get the same kind of IDE experience with something like Python. The tools have come a long way and are at least decent now, but will never be as sharp as they will be for languages like C# or Java.


Compared to the TypeScript experience in the same editor, the Python experience is terrible. A little bit of that can be attributed to Python's type system being less powerful than TypeScript, but most of it is not. Things like auto-imports, deep autocomplete, instant feedback on the errors it's able to detect, etc should be perfectly doable.


PyCharm community ed is free. Sublime Text is very good (it's nagware).



Has anyone ever managed to get autoformatting (Prettier etc) working on Django templates in VS Code?


I've been using Atom for a few years, with a few Python plugins it works really nicely!


Maybe I'll give Atom a try. I switched from it to VSCode a few years ago because it just wasn't as stable and didn't perform as well, but if the Python support is better it could be worth it.


PyCharm is too bloated and under-designed for me.

I prefer Atom. Simple, fast, and pretty.


Same here, Pycharm community edition, works like a charm ;)


do yourself a favour and try liclipse (or eclipse with pydev)

https://www.pydev.org/


On Windows, Mu Code is best editor for beginners.


visual studio community with python tools


Honestly ppl: vim or emacs - the rest is fluff


Or both, with Spacemacs. I'm all in on Emacs though.


I had a coworker who couldn't understand why people didn't just use emacs.

I figured he was just cocky or he just didn't understand people in general.

The huge downside of emacs is it's Huge learning curve. The rest is not fluff because the rest roughly have zero curve.


Vim... does not have a zero learning curve.

For me, the huge downside of emacs is the not-very-fast single-threaded virtual machine with dynamic scope and one huge global namespace. It does an incredible number of cool things, some of them you can't find anywhere else, but I always end up bailing for an editor where I can reliably type and have characters show up instantly.


Slight error, yes vim has a learning curve.


Vim also has modes.

But I guess you've never heard of Larry Tesler or Jeff Raskin, either.


I actually (honestly) haven't heard of them. Are they your programming idols? Are they beyond reproach? Do you worship them and snark at anyone who criticizes there ideas?


Obviously you've also never heard of google.


Yeah (Obviously)


So when you said "(honestly)", you actually meant "(dishonestly)", correct?

Do you also "(honestly)" believe Trump was being sarcastic when he told everyone to inject bleach?


stop, we're done.


Vim has a very short learning curve, because the only command you need to learn is ":q!".


Sublime is fluff?


PyScripter


Python is a text-based language. Aren't all these editors "text-based"? You know you don't have to run Emacs in a terminal emulator, right? It's had mouse support for decades.


I don't want to have to memorize a litany of new keyboard shortcuts to do basic tasks.


spacemacs is built with hot key discovery AND modal editing makes it even easier

but, you know, if you don't want to try, then don't


Then don’t. It has a menu bar.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: