Tensibai was correct, the telnet session in the expectexpect
module had to end.
Holding down down the key combination "Ctrl + ]"Ctrl+] to exit wasn't going to work, so an optional escape character was chosen in the telnet command. like so:
e.g. telnet -e ! 10.224.223.10
telnet -e ! 10.224.223.10