[Tutor] How to open a telnet session and have the python programwrite to it.

Alan G alan.gauld at freenet.co.uk
Mon Jun 6 18:02:33 CEST 2005


>         I am attempting a python program that will open a telnet
session and
> input the username/password, cd to a certain directory and leave the
session
> there.   I have attempted different combinations of the os.popen etc
but as
> soon as the telnet window is opened the program cannot be coaxed to
write to
> the telnet session (window).   I have attempted the telnetlib, but
the
> problem is that the telnet window does not show up.

Try pyexpect....

I think you have to download it though.

Alan G.



More information about the Tutor mailing list