nowfound

Life & fun · June 11, 2017

SP

Sultan – Pythonic interface to your shell

Sultan – Pythonic interface to your shell launched on June 11, 2017 with 155 votes, #223 of 3,107 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 9 years on.

In plain words

Sultan is a Python package that provides a simple, Pythonic interface for running command-line utilities like yum, apt-get, and ls. Instead of writing shell commands as strings, developers can use Python function calls to execute and chain shell commands. It supports both standard execution and context management modes, making it useful for developers who want to automate system administration tasks and shell operations directly from Python code.

written from the facts on this page · September 2026

From the sources

Sultan is a Python package for interfacing with command-line utilities, like yum , apt-get , or ls , in a Pythonic manner. It lets you run command-line utilities using simple function calls. from sultan.api import Sultan s = Sultan () s . sudo ( "yum install -y tree" ) . run () Runs: sudo yum install - y tree ; The recommended way of using Sultan is to use it in Context Management mode. Here is how to use Sultan with Context Management: from sultan.api import Sultan with Sultan . load ( sudo = True ) as s : s . yum ( "install -y tree" ) . run () Runs: sudo su - root - c 'yum install -y tree;' What if we want to install this command on a remote machine? You can easily achieve this using…from sultan.readthedocs.io

Does a similar job

all alternatives →

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, June 2017

the whole month →