Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39912 > unrolled thread
| Started by | MRAB <python@mrabarnett.plus.com> |
|---|---|
| First post | 2013-02-25 21:15 +0000 |
| Last post | 2013-02-25 13:52 -0800 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: telnet to Cognex In-Sight 4001 camera MRAB <python@mrabarnett.plus.com> - 2013-02-25 21:15 +0000
Re: telnet to Cognex In-Sight 4001 camera chris.annin@gmail.com - 2013-02-25 13:52 -0800
Re: telnet to Cognex In-Sight 4001 camera chris.annin@gmail.com - 2013-02-25 13:52 -0800
| From | MRAB <python@mrabarnett.plus.com> |
|---|---|
| Date | 2013-02-25 21:15 +0000 |
| Subject | Re: telnet to Cognex In-Sight 4001 camera |
| Message-ID | <mailman.2522.1361826958.2939.python-list@python.org> |
On 2013-02-25 20:27, Chris Annin wrote:
> Ive tried: read_until("Login: "), read_until("User: ") and read_all()
> all 3 ways return the same thing: "Welcome to In-Sight(R) 4001 Session
> 1\r\nUser:"
>
[snip]
Does the returned string end exactly with "User:" (no space at the
end)? I ask because you're asking it to read until "User: " (space at
the end).
[toc] | [next] | [standalone]
| From | chris.annin@gmail.com |
|---|---|
| Date | 2013-02-25 13:52 -0800 |
| Message-ID | <542e5414-df16-473e-b31d-b064834a018b@googlegroups.com> |
| In reply to | #39912 |
On Monday, February 25, 2013 1:15:54 PM UTC-8, MRAB wrote:
> On 2013-02-25 20:27, Chris Annin wrote:
>
> > Ive tried: read_until("Login: "), read_until("User: ") and read_all()
>
> > all 3 ways return the same thing: "Welcome to In-Sight(R) 4001 Session
>
> > 1\r\nUser:"
>
> >
>
> [snip]
>
> Does the returned string end exactly with "User:" (no space at the
>
> end)? I ask because you're asking it to read until "User: " (space at
>
> the end).
yes it does have the space - sorry. does it make a difference if I use tn.read_until vs tn.read_all? will it close the connection or not accept a write command if I dont read_until? the fact that I get a traceback error when I read_until and I get ",,," when I use read_all - does this mean the connection has been closed?
also when I try tn.open(host) it will give me the welcome screen with the words "session 1" included in the string. if I then immediately try tn.open(host) again it will give me the same welcome message with "session 1" could the connection be closing before I get a chance to write the user name?
[toc] | [prev] | [next] | [standalone]
| From | chris.annin@gmail.com |
|---|---|
| Date | 2013-02-25 13:52 -0800 |
| Message-ID | <mailman.2523.1361829168.2939.python-list@python.org> |
| In reply to | #39912 |
On Monday, February 25, 2013 1:15:54 PM UTC-8, MRAB wrote:
> On 2013-02-25 20:27, Chris Annin wrote:
>
> > Ive tried: read_until("Login: "), read_until("User: ") and read_all()
>
> > all 3 ways return the same thing: "Welcome to In-Sight(R) 4001 Session
>
> > 1\r\nUser:"
>
> >
>
> [snip]
>
> Does the returned string end exactly with "User:" (no space at the
>
> end)? I ask because you're asking it to read until "User: " (space at
>
> the end).
yes it does have the space - sorry. does it make a difference if I use tn.read_until vs tn.read_all? will it close the connection or not accept a write command if I dont read_until? the fact that I get a traceback error when I read_until and I get ",,," when I use read_all - does this mean the connection has been closed?
also when I try tn.open(host) it will give me the welcome screen with the words "session 1" included in the string. if I then immediately try tn.open(host) again it will give me the same welcome message with "session 1" could the connection be closing before I get a chance to write the user name?
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web