#!/usr/bin/env python # gastronomy.py of 15 Nov 01 by chaz@nbtsc.org (www.nbtsc.org/~chaz). # You may modify & redistribute this, but not sell it. ''' Print words from the system dictionary suitable for use as the names of Gnome programs. ''' dict = open('/usr/share/dict/words').readlines() # To use a non-dictionary file, split-by-whitespace and uniqueify 'dict' here. for word in dict: if word[0] == 'g': # This could be optimized to notice alphebetization, if word[1:] in dict: # but this is what takes most of the time. print word, # If you're bored, have it print only ones that $(which) can't find.