Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39914
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-02-25 13:52 -0800 |
| References | <9qya2949lwvwn69b2oqy5xya.1361820262242@email.android.com> <CANVf7b-zce4qGu-dxTzMF7405=MNGurUQcJozbS3QBK-fFkZyg@mail.gmail.com> <mailman.2522.1361826958.2939.python-list@python.org> |
| Subject | Re: telnet to Cognex In-Sight 4001 camera |
| From | chris.annin@gmail.com |
| Message-ID | <mailman.2523.1361829168.2939.python-list@python.org> (permalink) |
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?
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
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
csiph-web