PyCon 2016 in Portland, Or
hills next to breadcrumb illustration

Tuesday 11:30 a.m.–noon


Anthony Scopatz

Audience level:
Python Libraries


Xonsh is general purpose shell that combines Python and the best features of Bash, zsh, and fish. Relying only the standard library and PLY, the xonsh language is a strict superset of Python that compiles to a Python AST. The shell provides exciting features such as a rich history, tab completion from bash and man pages, syntax highlighting, auto-suggestion, foreign-function aliases and more!


Xonsh is a Python-ish, BASHwards-looking shell language and command prompt. The language is a superset of Python 3.4+ with additional support for the best parts of shells that you are used to, such as Bash, zsh, fish, and IPython. It works on all major systems including Linux, Mac OSX, and Windows. Xonsh is meant for the daily use of experts and novices alike. Because xonsh *is* Python, it automatically has a huge number of tools and libraries available. Xonsh makes meshing this ecosystem with command-line interfaces as seamless as possible. Have you ever wanted to use regular expressions to glob files? No problem! Ever wanted to curl a remote resource right into `json.loads()`? Now you can. Do you not want to leave the command line to use pandas, NLTK, numpy, or simply add two numbers together? No big deal. Xonsh is the superglue that bonds Python to a command-line interface and other shells. Xonsh was also motivated by the desire for transparent provenance in a scientific computing context. Xonsh provides a rich, asynchronous history model that optionally allows for the user to store all output. This enables users to hunt down exactly what an error message was the first time it happened. This talk will demonstrate xonsh features ranging from the basic to the more advanced. It will discuss some of the details of how xonsh is implemented to show how it only requires the Python standard library and PLY. It will also discuss how intuitive, but ambiguous cases like `ls -l` are resolved. The xonsh homepage is at []( and [the mainline repo is on github](