How do I send telnetlib control + c command in python
问题 I am trying to send control + c command in python using telnetlib library. Currently I am doing tn.write('^]') But the code above doesn't seem to work. Any clue on What I should use? 回答1: Try ASCII characters of control+c to the telnet connection below:- tn.write('\x03') 回答2: ctrl+a = decimal 1 ctrl+b = decimal 2 ctrl+c = decimal 3 and so on.. to ctrl+x = decimal 24 ctrl+y = decimal 25 ctrl+z = decimal 26 escape = 27 etc Still, for those who will need this in the future Arrow keys are (3