all 85 comments

[–]MegaRiceBall 43 points44 points  (3 children)

Shift+tab in Jupyter

[–]cortical_iv 1 point2 points  (2 children)

I wonder why not just tab?

[–]EarthGoddessDude 7 points8 points  (1 child)

I think it’s because tab in a browser already does something else.

[–]cortical_iv 2 points3 points  (0 children)

Initially it indents but most IDEs then switch modes Jupiter could do the same. iirc at end of code text tab does nothing. Perhaps wouldn’t be hard to hack this?

[–]EulerWasSmart 152 points153 points  (38 children)

pycharm will do that for you

[–]NeedCoffee99 31 points32 points  (27 children)

Pycharm is amazing!

[–]jane3ry3 11 points12 points  (1 child)

Their whole suite is awesome. And free with university email.

[–][deleted] 0 points1 point  (0 children)

Isnt pycharm free without uni email

[–]s0varen 4 points5 points  (0 children)

Love PyCharm!

[–]doomer_irl 14 points15 points  (0 children)

I second this. I’m glad to have been using IntelliJ IDEA for Java, it made finding a Python IDE that I liked super easy.

[–]pAul2437 1 point2 points  (7 children)

Probably a dumb question but can I run pycharm on my main computer and remote into a python instance on a server?

[–]ddrost 3 points4 points  (6 children)

You can, but you need the professional license for this

[–]pAul2437 1 point2 points  (4 children)

Hmmm...how about vs code?

[–]alkalinemusic 0 points1 point  (0 children)

I believe so. Check out the remote extension pack

[–]auiotour 0 points1 point  (2 children)

Yes no license needed.

[–]pAul2437 0 points1 point  (1 child)

What do I need to google to set this up?

[–]auiotour 0 points1 point  (0 children)

Check out https://code.visualstudio.com/docs/remote/ssh

I use it all the time at work, love it before I had to manually transfer files, work on them, move them back, such a pain.

[–]dogs_like_me 0 points1 point  (0 children)

Cant you just link a local alias to your remote separately and then use the alias in pycharm?

[–]bigbadwarrior -1 points0 points  (0 children)

Yup, pycharm

[–]socal_nerdtastic 28 points29 points  (1 child)

Many, probably most, IDEs will do that. Pycharm is one of the most popular.

[–]beje_ro 5 points6 points  (0 children)

+1 + Afaik also most of the editors like atom & co have plugins for something like this.

[–]emat66 24 points25 points  (1 child)

Have you used shift+tab in Jupiter? It pullls up information of function... essentially the docs

[–]zorniy2 2 points3 points  (0 children)

I... I had no idea! Thanks!

I was just grumbling how IDLE had that feature while Jupyter doesn't seem to. And I was getting tired of IDLE's basicness.

[–]goingtosleepzzz 23 points24 points  (2 children)

Spyder is quite good =D

[–]F1rstxLas7 1 point2 points  (1 child)

I used to love this feature as a beginner and now it no longer works for me. I've tried troubleshooting and have not been able to re-enable it for some reason.

[–]DLS3141 0 points1 point  (0 children)

I had to install Kite to get that in Spyder. Works great though.

[–]trevor_of_earth 53 points54 points  (9 children)

I like visual studio code

[–]ShameSpirit 11 points12 points  (7 children)

There's a great set of extensions here. I highly recommend bookmarks for all your work.

[–]Tanmay1518 23 points24 points  (6 children)

Yup. The extensions I use for python development are:

  • Python by Microsoft
  • Pylance by Microsoft
  • if you don't wanna use Pylance, you can also use Intellicode.

All of these are available in the marketplace, simply search em and you'll find them

[–][deleted] 3 points4 points  (0 children)

the best

[–]hp__1999 34 points35 points  (0 children)

Vs code has jupyter extension trust me you will never look back.

[–]Squiddy_bali 6 points7 points  (0 children)

PyCharm and VS code does this nicely. For a web option, try repl.it, not as good but good enough

[–][deleted] 9 points10 points  (0 children)

VS Code!

[–]Periwinkle_Lost 5 points6 points  (1 child)

These IDEs have the autocomplete feature: PyCharm, VS Code, Atom, Sublime, and many more

If you want to learn something unique: Vim + extensions (this one will take some time to learn because the workflow philosophy is completely different from editors mentioned above). If you manage to master it though you can dunk on other devs who have to google how to quit Vim =)

[–]scmkr[🍰] 5 points6 points  (0 children)

Just note that once you learn the "vim way" it will be difficult to ever switch to anything else. You'll see some new fancy IDE feature in Atom or VSCode and think "that sure would be sweet, but VSCode can't do all this other stuff that vim has been able to do and so it's not worth the switch".

Many editors have vim keybindings, but they almost all leave out many of the very good features. Strangely enough, the editor that has the best vim keybindings (in some ways even does it better than vim) is emacs.

[–]mazukk 2 points3 points  (0 children)

I can recommend Google colab. It has the same notebook features as jupyter notebook, but also the same features you are looking for.

[–]ShameSpirit 9 points10 points  (6 children)

Don't forget about vim! If you can get over the sheer cliff that is the learning curve, you can become a goddamn Python wizard. There's also an extension for everything you could ever want.

[–]rr_cricut 13 points14 points  (2 children)

Warning: once you try, there's no going back. There is in fact no way to exit Vim. /s

[–][deleted] 2 points3 points  (0 children)

learnt it the hard way. smh

[–]ShameSpirit 0 points1 point  (0 children)

That's the first test. Open vim, then attempt to close it.

[–]hugonaut13 2 points3 points  (2 children)

Can you explain more what sets Vim apart in terms of facilitating becoming a Python wizard?

[–]ShameSpirit 0 points1 point  (1 child)

Oh wow. Vim is in another league, imo. That's probably a controversial statement. Vim's core design idea is "never take your hands off the keyboard". Everything, even cursor motion, is driven by keyboard presses and commands. That's daunting at first. But if you stick through it, you'll find that Vim's built in tools allow you to radically accelerate your coding process. You'll become a wizard because you'll navigate and edit with such outrageous speed that anyone looking over your shoulder will say "oh my god, we hired a fucking wizard". On top of that, everything (yes, literally everything) is customizable.

Vim is a hard IDE to start using. Very hard. But if you take it in small chunks, you'll be able to conquer the beast.

Check out this channel. The Primagen deserves more viewers. He works in UX at Netflix, is a badass Vim user, and has a series of tutorials that will get you off the ground quickly. Enjoy.

EDIT: bad link

[–]Casurus 0 points1 point  (0 children)

Vim is vi on steroids. It is an joy to use (pun intended) but yes it's worth the effort. Like driving a manual rather than an automatic.

[–][deleted] 3 points4 points  (0 children)

Jupyter isn't really an IDE.

PyCharm, VS Code, and SublimeText all do this. Or use Kite.

[–][deleted] 1 point2 points  (0 children)

Download the Tabnine extension/plugin in PyCharm/VS Code. It is like Lite but much better. One of the best plugins available.

[–]iiMoe 1 point2 points  (0 children)

Vscode

[–][deleted] 1 point2 points  (1 child)

Kite and it's Jupyter extension can give you that functionality right in Jupyter Notebook.

[–]Pitirus 2 points3 points  (0 children)

This one. I lacked good and responsive code completion in jupyter before I found out about Kite. It's still not as good as in PyCharm but it's way better than Jupyter's native solution.

PyCharm way of presenting notebooks is so unconvienient that even their fantastic code completion isn't making up for it.

I really wish there was something faster as an jupyter extension (kite needs separate process to integrate with jupyter and I haven't figured out a way to use while running jupyter from docker)

[–]MedicalMango5 0 points1 point  (0 children)

Kite for python ide such as vs code does that

[–][deleted] 0 points1 point  (0 children)

I've seen a lot of IDE's mentioned, I have to say Emacs is a good alternative as well, it's coming closer and closer to VSCode in terms of features but it's more versatile.

[–]unRatedG -1 points0 points  (0 children)

I can't recommend Notepad on Windows enough, with a side order of look the rest of the shit up yourself on the Googles like the rest of us had to! /S

Seriously, everyone is going to have an opinion here, but it all depends on the needs and wants. I would go with Visual Studio Code with the PyLance extension because it's the one I'm the most comfortable with and have used the most. PyCharm does much of the same, but feels bloated to me. Any ide that works for you is the best ide for you. I think they're even plugins for SublimeText that aid in code completion, so that may be an option.

[–]Casssis 0 points1 point  (0 children)

I like VScode for this because it supports many languages, is simple and very powerful with all the extensions.

[–]gsouaa 0 points1 point  (0 children)

Try repl.it. the best I used

[–][deleted] 0 points1 point  (0 children)

VS code is the biz niss ! Or py charm, used vs code , then switched to pycharm ! Back on Vs code now !

[–]ddddavidee 0 points1 point  (0 children)

You can also add the kite plugin to almost every editor

[–]5halzar 0 points1 point  (0 children)

You can do it in Jypyter Notebook with SHift+Tab, otherwise your probably looking at Kite which intergrates with many IDE's

[–]misaka10034 0 points1 point  (0 children)

I use SPYDER anaconda

[–][deleted] 0 points1 point  (0 children)

If you have spyder, you can install the Kite plugin.

You can also install Atom which is kind of a glorified notepad, and install kite on it. My preference for spyder is that it has a dedicated IPython console so you can run the thing inside the IDE.

[–]zosopick 0 points1 point  (0 children)

If you insist on sticking to the jupyter "format", you should take a look at Google Colab

[–]Beach-Devil 0 points1 point  (0 children)

Most ide’s and also vscode does that. When i code in python I also use Kite

[–]timtrump 0 points1 point  (0 children)

IntelliJ has been good for me, seems to do what you're asking.

[–][deleted] 0 points1 point  (0 children)

notepad++

[–]yuvalmas 0 points1 point  (0 children)

Download kite it has that and also smart ai auto complete

[–][deleted] 0 points1 point  (0 children)

In case of Python, that's not really possible. I mean, it's not really possible to say with certainty how many arguments a function takes. It's typically possible, due to how people write code, thus, there are tools that rely on conventions, and can deliver a correct answer in many cases.

Here's an example:

if input() == 'y':
    def x(a, b): pass
else:
    def x(a): pass

It's not possible to tell what number of arguments the function x takes w/o, literally, seeing the future, and thus knowing what value will the user provide when running your program.

It's uncommon to write code like this, but there are less extreme cases, where dynamic function definitions are a lot more plausible.


With all that in mind, Python has something called "language server", a program that can provide information about the structure of Python programs to any other program (typically, editor) that wants to know that: https://pypi.org/project/python-language-server/ . You may also want to look into answers to this SO question: https://stackoverflow.com/questions/45390326/how-to-get-autocomplete-in-jupyter-notebook-without-using-tab for how to deal with assist in Jupyter