It sounds like a case for the Expect program, to me. Try Google-ing for "Expect". If you are looking for a Python approach, then try googling for "Expect Python". Jim