Site icon Mike's Software Blog

“Hello World” in python (with curses)

I use the ncurses library a lot, and decided to have a shot at python today.

Thankfully they have a great curses module, so I started out with a “hello world” program that looked like this:

#!/usr/bin/env python
import curses

scr = curses.initscr()
scr.keypad(0)
curses.noecho()

scr.addstr("hello world")
scr.refresh()
scr.getch()

curses.endwin()
Exit mobile version