Guy> I'm trying to find a way to write something like expect in a python Guy> module, ... Any particular reason you're not using one of the other Expect-like Python thingies: http://www.vex.net/parnassus/apyllo.py?find=expect ? -- Skip Montanaro (skip at pobox.com - http://www.mojam.com/)