"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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#!/usr/bin/env python
import curses

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

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

curses.endwin()