SHARE
Facebook X Pinterest WhatsApp

Code Project: Build an Ncurses UI with Python

Written By
thumbnail
Web Webster
Web Webster
Apr 27, 2009

“n this guide, we’ll show you how to write a nifty front-end for
the useradd utility, a command which (unsurprisingly) lets you add
user accounts to your Linux installation. Like many administration
tools, useradd requires a long string of options and parameters;
we’re going to make it much simpler by creating an interactive
dialog-driven version called UserMaster.

“Now, useradd is a fairly trivial tool and there’s an
alternative command, adduser, which prompts you step-by-step. But
here we’ll give you the code and techniques to make your own config
tools – so at the end, you’ll be able to write user-friendly
utilities for starting services, clearing temporary files, or
anything else you’d normally do at the shell prompt. Not only will
this save you vital time when you’re at the command line, but it
means you can write config tools for other people who may log into
your machines. If you run a server and don’t want users trying to
guesstimate super-complex commands, you can knock together a quick
dialog-based version.

“As with our previous code projects (check them out – go on,
just right-click the link and select Open Link in New Tab!), this
guide assumes a smattering of programming knowledge. Don’t worry:
you don’t need to be a coding whizz, but if you’ve played around
with another language before, you’ll be off to a flying start. But
even if you’ve never written a line of code in your life, hopefully
this tutorial will show you how programs fit together and what you
can do. Enough chit-chat – let’s get started with
UserMaster…”


Complete Story

thumbnail
Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Recommended for you...

5 Best Free and Open Source Text Expander Tools
webmaster
Jun 13, 2025
Grafito: Systemd Journal Log Viewer with a Beautiful Web UI
Bobby Borisov
Jun 12, 2025
FreeBSD Wants to Know a Few Things
brideoflinux
May 11, 2025
NVK enabled for Maxwell, Pascal, and Volta GPUs
Kara Bembridge
May 1, 2025
Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.