Wait, IPython Can Do That?

摘要

I’ve been using IPython since the beginning of my adventure with Python. Over the years, I've picked up more and more tricks that it could do.

In this talk, I would like to share some of them with you:
- Documentation with ? and ??, running shell functions in IPython, magic functions
- Profiles, startup files, configuration file, kernels, and extensions
- How to better use IPython for debugging
- How to use IPython for profiling
- Alternatives to IPython REPL

說明

This talk **is for you** if you are a casual user of IPython - you know some of its features, but maybe not all of them and instead of reading through the documentation, you would prefer to see most features of IPython in action. This talk **is NOT for you** if you are up to date with IPython documentation and you think you know most of its features. I've been programming in Python for over 7 years. And from the time someone introduced me to IPython, it immediately became my default Python REPL (is there still anyone who prefers the standard Python REPL instead of IPython?). I enjoyed the syntax highlighting, code completion or instant access to the documentation. Over the years, I've picked up more and more tricks that IPython could do: embedding IPython sessions, starting IPython automatically when a test fails, taking advantage of the startup files, not to mention all the various magic functions. It took me some time to discover all those features (if there is one thing I would like you to take away from this talk, it’s that reading the documentation of a tool that you are using every day is probably a good idea) and in this talk, I will give an overview of what you can do with IPython REPL. This talk is focused on IPython REPL and while most of the content can be applied to Jupyter Notebooks, I will not talk about Jupyter Notebooks (there are many other great talks on that subject, like "IPython and Jupyter in Depth: High productivity, interactive Python" from PyCon 2017). This is the first time I will be giving this talk. I've been using IPython for as long as I can remember (since the 0.x version). Probably anyone who can read thoroughly the documentation of IPython and compile a list of all its' features (plus do some research to see how people are using it) and present it in an easy to understand format could make this presentation, but so far no one actually did, so that's why I'm here ;) I saw presentations about IPython in the past, but they usually just skimmed the surface - they covered the basic usage of the REPL, showed some magic functions, but they never explained, for example how to create your own magic function or what one can find in the `ipython_config.py` file.

投影片

https://switowski.com/python/ipython/slideshttps://tw.pycon.org/2019/07/07/wait-ipython-can-do-that.html

講者

Sebastian Witowski

I'm a software engineer with 7 years of experience in full stack development, operations and leading small projects.
I had worked as a DevOps at CERN for the past 6 years, but recently I have decided to move to Python consulting and trainings.

In my spare time, I like to give talks about Python, coding and productivity. Python is my main programming language, but I don't shy away from using different languages as well.