Hello,
I have Python 3.9.
When I trie to sent a command via Telnet to a device it doesn't react.
In Putty I'm able to sent the command, so that means the command itself and the device
and the connection work.
This is the code
In Putty I just type in "plain text" , which I mean I just type letters on my keyboard.
Are there a few things I can try to see the outcome ?
Thanks for the help.
I have Python 3.9.
When I trie to sent a command via Telnet to a device it doesn't react.
In Putty I'm able to sent the command, so that means the command itself and the device
and the connection work.
This is the code
from telnetlib import Telnet import time tn = Telnet('10.0.8.245', 23, 30) time.sleep(1) tn.write("SourceSelector1 set sourceSelection 1".encode('ascii') + b'\n')I don't get any "errors". But I think it has something to do with ASCII and HEX and how the device reacts on that.
In Putty I just type in "plain text" , which I mean I just type letters on my keyboard.
Are there a few things I can try to see the outcome ?
Thanks for the help.
Larz60+ write Nov-12-2020, 01:09 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed this time. Please add tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed this time. Please add tags on future posts.