The standard "cmd" module provides a class which does the suggested lookup/dispatch, but using reflection. You just define methods like do_a(), then "a" automatically becomes a recognized command. That might be slightly simpler, and you get command recall, etc. -Andy