top.py - update curses usage and add head function.