[newbie] trying socket as a replacement for nc
jeanmichel at sequans.com
Mon Dec 16 17:44:31 CET 2013
> This is what I got using telnet:
> [jean:~] $ telnet 10.128.59.63 7000
> Trying 10.128.59.63...
> Connected to 10.128.59.63.
> Escape character is '^]'.
> KEITHLEY INSTRUMENTS INC.,MODEL 2425,1078209,C32 Oct 4 2010
> 14:20:11/A02 /E/
> after pressing CTRL-ALT-ALTGR-] I get this:
> after which I get the telnet-prompt
> and I can quit telnet by entering quit
> kind regards,
Looks like you don't have any prompt.
Try something simple first:
host = '10.128.59.63'
port = 7000
t = Telnet(host, port)
t.write('%s\n' % cmd)
-- IMPORTANT NOTICE:
The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
More information about the Python-list