1024pxhawkwingconch2macro100664195orig

New shell packs power of Python and Bash

Xonsh, now in development, provides a shell that combines the Python language with features of Bash Unix and the fish and zsh shells.

Pronounced "conch," the tool works with Linux, Windows, and Mac OS X, and it offers a shell language and command prompt. It compiles to a Python AST (Abstract Syntax Tree), features a superset of Python 3.4, and relies on the Python standard library and the PLY parsing tool.

"The first thing you'll notice about Xonsh is that it's really meant to be used as a general-purpose shell," lead developer Anthony Scopatz, associate professor in the nuclear engineering program at the University of South Carolina, said at this week's PyCon 2016 conference in Portland, Oregon. "But on the other hand, it really is Python, so you can do things like add two numbers together."

Xonsh is intended for both novice and expert usage. It features such capabilities as history, syntax highlighting, autosuggestion, and foreign-function aliases, and it adds shell-like primitives, such as a dollar sign operator to look up variable names.

The Python ecosystem and libraries are available to be meshed with command-line interfaces. This lets developers use regular expressions to glob files, curl a remote resource into json.loads(),  and stay on the command line to use pandas, NLTK, or numpy. The project's description calls Xonsh "the superglue that bonds Python to a command-line interface and other shells."

Scopatz said startup times for Xonsh are not good, but developers are working on improving them. Xonsh, whose development was motivated in part by a desire for transparency in scientific computing, offers an asynchronous history model for users to store output, which helps with handling error messages.

IDG Insider

PREVIOUS ARTICLE

« Cuba works to join the global economy, and IT sees a golden opportunity

NEXT ARTICLE

New peripherals are bringing Windows Hello to any Windows 10 PC »
author_image
IDG News Service

The IDG News Service is the world's leading daily source of global IT news, commentary and editorial resources. The News Service distributes content to IDG's more than 300 IT publications in more than 60 countries.

  • Mail

Recommended for You

Trump hits partial pause on Huawei ban, but 5G concerns persist

Phil Muncaster reports on China and beyond

FinancialForce profits from PSA investment

Martin Veitch's inside track on today’s tech trends

Future-proofing the Middle East

Keri Allan looks at the latest trends and technologies

Poll

Do you think your smartphone is making you a workaholic?