My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
SnackTutorial  
Snack Library Python tutorial
Updated Dec 13, 2009 by msg4alex@gmail.com

SnackScreen

Snack is the newt library implmentation for python. It's purpose is to create simple text based user interfaces (TUI).

Windows are organized as a stack, meaning the the only active window is the last one created. Once it is closed, the active window becomes the one created before it.

from snack import *
screen = SnackScreen ()

# create a cenetred window
window = screen.centeredWindow (width, height, title)

#create a window
window = screen.openWindow (left, top, width, height, title)

# close the top window
screen.popWindow ()

# refresh the screen
screen.refresh ()
Powered by Google Project Hosting