IBM developerWorks: Charming Python: Curses programming - Tips for beginners | Linux Today

IBM developerWorks: Charming Python: Curses programming – Tips for beginners

Written By
Web Webster
Web Webster
Sep 23, 2000

[ Thanks to Raj
Singh
for this link. ]

A certain class of Python applications works best with an
interactive user interface without the overhead or complexity of a
graphical environment.
For interactive text-mode programs
(under Linux/UNIX), for example, the ncurses library, wrapped in
Python’s standard curses module, is just what you need. In this
article, David Mertz discusses the use of curses in Python. He
illustrates the curses environment using sample source code from a
front-end to the Txt2Html program.”

“The curses library (ncurses) provides a terminal-independent
method of controlling character screens. curses is a standard part
of most UNIX-like systems, including Linux, but has also been
ported to Windows and other systems. Curses programs will run on
text-only systems and within xterm’s and other windowed console
sessions, which helps make these applications very portable.”

“Python’s standard curses provides a basic interface to the
common features of the “glass teletype,” as the CRT was known in
the 1970s when the original curses library was created. There are a
number of ways to bring greater sophistication to interactive
text-mode programs written in Python. These fall into two
categories.”


Complete Story

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.

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. © 2026 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.