Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39905
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.szaf.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <square.steve@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.008 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'debug': 0.05; 'sys': 0.05; 'returned.': 0.07; 'session.': 0.07; 'python': 0.09; 'pointers': 0.09; 'stating': 0.09; '2.7': 0.13; 'steve': 0.13; '"..."': 0.16; 'away....': 0.16; 'galaxy': 0.16; 'isnt': 0.16; 'skip:> 20': 0.16; 'telnetlib': 0.16; '>>>': 0.18; 'windows': 0.19; 'skip:" 30': 0.20; '"",': 0.22; '>>>': 0.22; 'assuming': 0.22; 'help.': 0.22; 'to:2**1': 0.23; 'raise': 0.24; 'command': 0.24; 'looks': 0.26; 'appreciated.': 0.26; '(most': 0.27; 'older': 0.27; 'skip:> 10': 0.27; '--------': 0.28; 'chris': 0.28; 'run': 0.28; 'far,': 0.29; 'initiate': 0.29; 'received:192.168.1.3': 0.29; 'date:': 0.29; 'url:mailman': 0.29; 'skip:& 10': 0.29; 'connection': 0.30; 'skip:& 30': 0.30; 'url:python': 0.32; 'file': 0.32; 'to:no real name:2**1': 0.32; 'url:listinfo': 0.32; 'traceback': 0.33; 'to:addr:python-list': 0.33; 'code:': 0.33; 'weeks': 0.33; 'skip:& 20': 0.33; 'received:google.com': 0.34; 'subject:': 0.36; 'but': 0.36; 'url:org': 0.36; 'email addr:python.org': 0.36; 'useful': 0.36; 'thank': 0.36; 'communicate': 0.37; 'far': 0.37; 'subject:: ': 0.38; 'from:': 0.38; 'some': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'hello,': 0.39; 'skip:" 10': 0.40; 'received:192.168': 0.40; 'subject:-': 0.40; 'help': 0.40; 'url:mail': 0.40; 'your': 0.60; 'email name:python-list': 0.62; 'email addr:gmail.com': 0.63; 'dont': 0.64; 'here': 0.65; 'camera': 0.65; 'risk': 0.66; 'header:Reply-To:1': 0.68; 'hoping': 0.72; 'reply-to:addr:gmail.com': 0.79; '-\xc2\xa0': 0.84; 'conversation': 0.91; 'obvious,': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:subject:message-id:importance:from:to:reply-to :mime-version:content-type; bh=0mwXc3CE/yx1Gqm4Cm2vxXM7aLP3uH3rP7fnU3pGyOY=; b=nw+9yguYqhTvgDB8yPqCTOUZ+CHMCJ8iVvkV9betHBawr7FqqhNGjzs9ibYn/YIRWI 7uknIvPa3NC32RDFwvjWFh52qSqe1F+iTW4B6Q7q1jJT5lw2fMUB1B4ZHl/ikv22E54r uNixJkkoWSa5IVnuaph8DQVWa65tYmMlyrJPCTjzunlsvGcq4M0PKvRJa5nPml4Q/kfX iV3ytvgfrw+68SIGLEEMvyHyAeSSYMg4Qleuef7KQVNWaAAr7+fTXpb+t6hRoIbmhTN2 O/Ym08rpjL7RUhU6a8iscFnpLNvrHgAN8HGXYMtUgCCVphnYch9B9WnlkdrReKSRLpU6 Hw6Q== |
| X-Received | by 10.180.81.164 with SMTP id b4mr14561461wiy.34.1361820273390; Mon, 25 Feb 2013 11:24:33 -0800 (PST) |
| Date | Mon, 25 Feb 2013 20:24:22 +0100 |
| Subject | Re: telnet to Cognex In-Sight 4001 camera |
| Importance | normal |
| From | "square.steve" <square.steve@gmail.com> |
| To | chris.annin@gmail.com, python-list@python.org |
| MIME-Version | 1.0 |
| Content-Type | multipart/alternative; boundary="--_com.android.email_29879766482800" |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | "square.steve" <square.steve@gmail.com> |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2517.1361820275.2939.python-list@python.org> (permalink) |
| Lines | 80 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1361820275 news.xs4all.nl 6914 [2001:888:2000:d::a6]:34109 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:39905 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
At the risk of stating the blindingly obvious, have you run a 'real' telnet session to see what a successful conversation looks like? Might give you some useful pointers for your debug session.
Steve
Sent from a Galaxy far, far away....
-------- Original message --------
From: chris.annin@gmail.com
Date:
To: python-list@python.org
Subject: telnet to Cognex In-Sight 4001 camera
Hello, ive been struggling with this for a couple weeks now and was hoping someone might be able to help. I have an older Cognex camera that I need to communicate with via telnet. I can get a response from the camera when I initiate a telnet session but I dont seem to get any response when I write the user name to the camera - I havnt been able to get any response writing anything. Im using python 2.7 and windows xp. here is the code:
[code]
>>>import sys
>>>import telnetlib
>>>HOST = "10.31.18.21"
>>>USER = "admin"
>>>tn = telnetlib.Telnet(HOST)
>>>tn.read_until("Login: ")
"Welcome to In-Sight(R) 4001 Session 1\r\nUser:"
>>>tn.write(USER + "\r\n")
>>>tn.read_until("User: ")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\telnetlib.py", line 319,
return self.read_very_lazy()
File "C:\Python27\lib\telnetlib.py", line 395,
raise EOFError, 'telnet connection closed'
EOFError: telnet connection closed
>>>
[\code]
if i do a read_all instead of read_until for user I just get "..." returned. Im assuming tn.write command isnt working? any help would be greatly appreciated.
thank you
Chris
--
http://mail.python.org/mailman/listinfo/python-list
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: telnet to Cognex In-Sight 4001 camera "square.steve" <square.steve@gmail.com> - 2013-02-25 20:24 +0100 Re: telnet to Cognex In-Sight 4001 camera chris.annin@gmail.com - 2013-02-25 11:42 -0800 Re: telnet to Cognex In-Sight 4001 camera chris.annin@gmail.com - 2013-02-25 11:42 -0800
csiph-web