working Flask telnet interface