Paul Krill
Editor at Large

IPython REPL update advances code formatting

news
Jan 13, 20222 mins

The new version of the tool also emphasizes error traceback and auto-suggestions.

python snake programming language numbers
Credit: Thinkstock

Version 8 of the IPython REPL (read-eval-print-loop) has arrived, with enhancements for code formatting, auto-suggestions, and tracebacks.

Unveiled January 12, IPython 8, which is under the Project Jupyter umbrella, has been in the making for three years, since the 7.0 release. One key feature is auto-reformatting with black in the CLI. If<span style="font-size: 10.0pt;"> black</span> is installed in the same environment as IPython, terminal IPython will now by default reformat the code in the CLI when possible.

Version 8 also correctly formats the error traceback capability, showing the cell number in which the error happened. Previously, tracebacks for errors happening in code cells showed a hash, the one used for completing the Python AST (abstract syntax tree). IPython 8 allows users to accept auto-suggestions with Ctrl-E, Ctrl-F, or Right Arrow. This is available in the fish and zsh shells and prompt-toolkit.

Instructions for installing IPython can be found at IPython.org. The release also removes almost all features, functions, and modules marked as deprecated between IPython Versions 1.0 and 5.0, according to documentation. The goal of IPython is to provide a comprehensive environment for interactive and exploratory computing. A Python REPL, it powers the Jupyter Kernel via ipykernel and is positioned to provide tab completions, better tracebacks, multiline editing, and features on top of pure Python scripts.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author