Posts tagged: ipython

All posts with the tag "ipython"

1 posts latest post 2021-12-20

Smoother Python with automatic imports | pyflyby

This is not a flaky works half the time kind of plugin, it’s a seriously smooth editing experience. I’ve just started using pyflyby, and it is solid so far. I have automatic imports on every save of a python file in neovim, and automatic imports on every command in ipython. I can’t tell you how pumped I am for this, and how good its felt to use over the past few weeks. It’s glorious. YouTube video # Listen to me rant on how great pyflyby is https://youtu.be/2QW5DJiEJH4 Give the video a watch, I did not have noise-cancelling on in obs. My apologies for the background hum and the mic stand bumps. I did my best to fix them up. Installation # How to install pyflyby for automatic python imports pyflyby is hosted on pypi, so you can get it with pip. I have had no issues installing it on 3.8+ so far. Configuration setup with stow # always stow your dotfiles If you’re going to configure any of your tools the first thing you should do is set it up with stow, seriously don’t sleep on the stow. I…

Ipython Ninjitsu

?docstring??sourcecode %run %debug %autoreload %history autoformat %reset!shell commands?docstring # Stop going to google everytime your stuck and stay in your workflow. The ipython is a superhero for productivity and staying on task. Note This does jump you into a pager, a j,k or up, down to navigate, q to quit.??sourcecode # Docstring not enough for you use case. I often run into cases where the docstring is not clear enough and I need to see the implementation for myself to see what a function does. %run # I turned my nose up at this one, prior to seeing the famous I don’t like notebooks by Joel Grus. My first snobby reaction was that developing modules and using autoreload was superior. I have since realized there is a place for, and it can cut down on some keystrokes to import, setup, and run even when developing in modules. %debug # ipython comes with a post-mortem debugger, and it can be a lifesaver. If we have a long running function that runs into an error it can be a complete…