agreed, SSH is advisable over telnet in nearly all situations. However, there are a few times where telnet is better. 1. Embeded machines often have stripped down OS's. Telnet is much smaller and cheaper than a full blown SSH install. When every byte counts, you wont find SSH 2. He may have a pre-existing network which his job does not allow him to modify.
In either case, pexpect will do the job you need. Build the scripts with pexpect, and then look into whether or not you can upgrade from telnet to SSH. Converting a pexpect script from telnet to SSH is trivial. I've got a few scripts to do exactly what you are asking to do, from a Gnome machine, along with an XML file to configure it. It spawns a gnome multi-terminal with all the tabs, then telnets, ssh's, or connects to the local machine, and runs a command. Once that command is done, the window enters "interactive" mode and behaves just like any other shell. Are you at liberty to explain the network more fully? Mr. D'Oliveiro makes an excelent point. When you're doing the same thing to a bunch of machines, there's a good chance that a unix sysadmin has banged his/her head on the table over the same problem, and wrote a program to do this. Programs like rsync exist because of the challenges of keeping multiple machine synchronized. Annother option would be to do some creative mounting of NFS volumes. A unix guru would be able to direct you to the most elegant solution -- http://mail.python.org/mailman/listinfo/python-list