Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ctrl-b 09
#1
I'm trying to send a command ^B09 to a device with python's telnetlib.

Logging directly into the device with putty and issuing the commands work fine.

However, would like to automate some of these commands with python.

self.telnet = telnetlib.Telnet()
self.telnet.open(ip, self.port)
t = self.telnet

t.write(b'\x05') # -----> ^E (Control Character)   *** Works great ***
t.read_until('READY', 5)

t.write(b'\x02\x30\x39')     # -----> ^B09   *** DOES NOT WORK ***
t.read_until('DISCONNECT', 5)
Very confused on how to concatenate the '09' onto the ^B.

B.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python continues after CTRL-C kjbolhuis 2 1,879 Aug-06-2021, 04:28 PM
Last Post: kjbolhuis
  Popen - How can I read data before CTRL+C command is issued maffaz 13 10,242 Jun-28-2018, 09:18 AM
Last Post: maffaz
  Help with code Python for "Ctrl+S" karlo_ds 1 3,092 May-28-2018, 11:22 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020