Hacker News new | past | comments | ask | show | jobs | submit login

Excited about this and have been a big fan of iPython since when I started coding in Python well over a decade ago. Might be a little while for switching to v8 due to the minimum 3.8+ version requirement for Python (which I totally understand from an ease of maintenance and forward looking mindset for the iPython projet). I use it all the time as my go-to REPL in Pycharm. Thanks to the team for all the work on it!

As an aside, I really wish the VSCode team did more to integrate iPython REPL more seamlessly into VSCode as that is one of the big blockers for me to using VSCode for anything Python related.




Thanks, in particular for your understanding with Python 3.8. It's in huge part to give a signal to businesses that that can/should move forward, and to give reasons for "smaller" projects with fewer devs to also remove support for older Python which can be a burden to maintain.

I don't use VS Code myself, but I think the team is doing in increasingly better job, Microsoft is just a huge beast. I would also love for some IPython feature to get into Core Python. But that might just take time as I don't think many Core Python Dev do that much interactive coding, and thus don't see that much the interest of doing so.

BTW it's uppercase I and P, we don't want to be in trouble with a billion dollar fruit company, even if we predate their use of iPxxxx


IPython (terminal repl) with autoreload has been God mode for me for about 10 years now. No other environment even comes close when it comes to exploring data, sketching out code and hacking towards a solution. And once you get most of the way there, stick stuff in a file and work with vim while IPython silently and reliably hot reloads all the code without losing the data you have loaded in your objects. It’s an absolute pleasure to use.

Thanks for your work on it, it really is much appreciated.


Agreed. I have exactly the same workflow except I end up using Pycharm with the interactive IPython REPL that it integrates with and graduate code up into modules in PyCharm. I like the variable viewer in PyCharm as that ends up being really handy when prototyping things in the REPL especially when working with data and writing algorithms, etc. It really does feel like "cheating"!


In solidarity with sibling comments, I also want to say that IPython has been pretty much my default shell for about a decade now. Auto completion, magic functions (paste, edit, pylab come to mind), auto reload, nice colors out of the box... it’s become a beloved piece of software to me over the years. Back in college, being introduced to IPython almost made it seem like Matlab wasn’t doing enough! I’m gushing a bit, but honestly IPython has solved many a problem for me, and I want to say thanks.


*trillions even :)



IP is definitely a fraught subject.


> As an aside, I really wish the VSCode team did more to integrate iPython REPL more seamlessly into VSCode as that is one of the big blockers for me to using VSCode for anything Python related.

VS recently made big changes to notebooks support [1], and they are now fully integrated into VS with their own Notebooks API. I've been following the changes for the past year on VS Code Insiders and the latest integration is really impressive from a UI and developer point of view. What's more is VS Code lets you easily use notebooks with any language (not just Python). I've had a really good experience so far using Julia kernels.

[1] https://code.visualstudio.com/blogs/2021/11/08/custom-notebo...


Thanks for the reply. Unfortunately, I am not looking for a Notebook experience but rather for integration of the IPython REPL shell as the default shell in VSCode so all code is being executed in there and so you can interactively prototype or debug code in an IPython shell. It is insanely more capable and powerful than any other regular Python shell, and without it, VSCode just feels a lot more gimped for Python development. Pycharm otoh is an example of an IDE that absolutely nails IPython shell integration into the IDE.


My default way of running snippets of Python code in VS Code is selecting code, and pressing shift+enter (mac) to execute the Python in an interactive window, which (I think?) is an IPython REPL.

Does the PyCharm integration offer something more capable? I'm interested in what I'm missing out on!


I don't believe the interactive REPL in VSCode is IPython. It is just a regular Python REPL from what I have seen. Some of the really nice advantages of the IPython REPL integration in Pycharm (along with a lot of extra legwork and features added by Jetbrains) are:

1. Multi-line text support and auto indentation support. This is *huge*. Most python REPLs are terrible at this including the default interpreter. You can easily copy paste code from scripts/modules into the REPL and the interpreter just handles everything seamlessly. It is even smart enough to remove a global indent across all the pasted code (if you copied code from within a function that was already indented 1 level up). It makes the REPL experience really really smooth.

2. Tab completion works beautifully with hover overlays

3. The integrated variable viewer is extremely good and you can easily view the local state of your interpreter and explore data/variables. The integrated Pandas dataframe and Numpy array viewers (available even in the free version) are really handy as well.

4. You can even attach a debugger to an interactive REPL session and if you then have breakpoints defined in associated libraries in your Pycharm IDE and then invoke code that would hit the breakpoint, it will pause at the breakpoint and give you the full debugging experience. This is really handy for reducing the time to debugging and investigating issues in code.

5. Matplotlib eventloop is handled very well in Pycharm which basically means that interactively plotting in the IPython REPL using matplotlib works seamlessly.

6. You also get some amount of linting/error checking in the REPL and also syntax highlighting, which is really helpful as well.

7. The IPython interpreter *is the default interpreter* which means that even when you debug code (with breakpoints for example), you get all of the benefits above while debugging, which is a really nice experience, especially with having access to the variable viewer.

8. Another annoyance I had with VSCode last time I tried using it is that the debugger while vastly improved still only allowed single line of code entry and was generally clunky if you wanted to paste multiple lines of code into the debugging REPL. Since you get the full IPython shell in Pycharm at all times (debugging or otherwise), it ends up being a lot more powerful and easier to use.

9. This is underrated, but Pycharm actually has a button that displays a log of all your code entries into your REPL. This is really handy in my experience as you can prototype code in the interpreter with working data/state, validate that it works right and then grab it from that window, copy it, and then paste it into a script/module to "graduate" it to more matured code.

That's what I could muster up off the top of my head. Pycharm in general has a ton of other nice things going for it, but ultimately, it is the really smooth REPL experience and how well integrated the shell is with the IDE that makes it my go-to IDE for anything Python.


Thanks. That's really helpful.

Given what you've said, I think the interactive window can be iPython in VS Code. This may be a relatively recent development.

I'm not sure what I did to enable this, but it may be because I have the jupyter extension for VS code installed.

For instance:

- If I do `df.plot()`, I get a matplotlib image displayed directly in the interactive window

- Auto indentation works

- Tab completion works

- Commands like %load_ext autoreload work.

It sounds like the integration isn't as tight as with PyCharm. For example, you mention having ipython available in a debugging session. That's one thing that I haven't managed to get working in VS Code.


100% agree on the vscode part. I like vscode a lot for various reasons and use it for various programming languages including Python, but the debugging console is such a pain to use. Would love an IPython integration.


One thing I've done to provide an enhanced debug experience to debugging in VScode. From the debugging console run:

from IPython import embed; embed()

This will open iPython in the terminal window with the state of your program at the debug point loaded in. You do need to "quit()" it before moving on in the debugger though.


I was using IPython to develop code by inserting the REPL to the right point in my project. But more recently I got used to VSCode and enjoy its ability to jump around in the stack and use the debug window in context. But the experience of editing code in the debug window is much inferior to IPython. It should be a regular editor and Tab should just insert a Tab, if I select something from the file I should be able to send it to the debug editor. It even handicaps the use of arrows, you need to do Shift+Up and Shift+Down if you have more than one line. Also, the debugger is slow, especially when showing a Pandas dataframe. I can still invoke IPython embed from the debug window.


You should really give Pycharm (free community edition works just fine) a shot. It has a bit of a steep learning curve getting set up, but it is everything you want both from an IDE and seamless integration with an IPython shell (you can toggle a setting to make it use IPython shells if IPython is installed in the project venv)


We actually took some of the best of both world, interactivity via Jupyter and the IDE strength, make sure to check out this: https://ploomber.io/blog/vscode-pycharm/




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

Search: