Re: [Tutor] Basic telnet question solved

2016-09-25 Thread David Rock
> On Sep 24, 2016, at 18:59, Phil wrote: > > On 25/09/16 07:17, David Rock wrote: >> header = tn.read_until("character is '^]’.”, timeout=5) >> print(header) > > Thank you David, read_until() led me to a result. It seems that the telnetlib > doesn't emulate the console telnet command exactly,

Re: [Tutor] Basic telnet question

2016-09-25 Thread Joaquin Alzola
>$ telnet localhost 7356 >The client then responds with: >Trying 127.0.0.1... >Connected to localhost. >Escape character is '^]'. Why not use the socket module? -- Joaquin This email is confidential and may be subject to privilege. If you are not the intended recipient, please do not copy or

Re: [Tutor] Basic telnet question solved

2016-09-24 Thread Phil
On 25/09/16 07:17, David Rock wrote: header = tn.read_until("character is '^]’.”, timeout=5) print(header) Thank you David, read_until() led me to a result. It seems that the telnetlib doesn't emulate the console telnet command exactly, so I didn't get the connection response that I had expec

Re: [Tutor] Basic telnet question

2016-09-24 Thread David Rock
> On Sep 24, 2016, at 15:49, Phil wrote: > > On 25/09/16 01:01, David Rock wrote: >> >> when you say "the client is not responding, certainly not as expected”, >> what, exactly, is the output you get? >> > > In my dazed state I think I responded to David personally instead of the > list, my

Re: [Tutor] Basic telnet question

2016-09-24 Thread Phil
On 25/09/16 01:01, David Rock wrote: On Sep 24, 2016, at 04:21, Phil wrote: The problem is that the client is not responding, certainly not as expected. There aren't any Python errors either, however, the console is blocked until the client is disabled. If I then attempt a connection with t

Re: [Tutor] Basic telnet question

2016-09-24 Thread Phil
On 24/09/16 21:03, Joaquin Alzola wrote: $ telnet localhost 7356 The client then responds with: Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Why not use the socket module? I did try the socket module, Joaquin but it didn't seem to be leading anywhere plus the

Re: [Tutor] Basic telnet question

2016-09-24 Thread David Rock
> On Sep 24, 2016, at 04:21, Phil wrote: > > The problem is that the client is not responding, certainly not as expected. > There aren't any Python errors either, however, the console is blocked until > the client is disabled. If I then attempt a connection with the disabled > client a Python

[Tutor] Basic telnet question

2016-09-24 Thread Phil
Thank you for reading this. If I enter the following at the prompt: $ telnet localhost 7356 The client then responds with: Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. I'd like to do the same from Python. My code is as follows: import telnetlib tn = telnetlib.Telnet