Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #62053
| Path | csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <prvs=0559fdd6f=jeanmichel@sequans.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.152 |
| X-Spam-Level | * |
| X-Spam-Evidence | '*H*': 0.70; '*S*': 0.00; 'subject:: [': 0.04; 'subject:trying': 0.09; 'python': 0.11; 'nameerror:': 0.16; 'port)': 0.16; 'subject:] ': 0.20; 'import': 0.22; 'print': 0.22; 'install': 0.23; 'code:': 0.26; 'defined': 0.27; 'header:In-Reply- To:1': 0.27; 'to:2**1': 0.27; 'host': 0.29; "skip:' 10": 0.31; 'jean': 0.31; 'file': 0.32; '(most': 0.33; 'skip:# 10': 0.33; 'but': 0.35; 'executing': 0.36; 'thank': 0.38; 'to:addr:python- list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'skip:t 30': 0.61; 'you.': 0.62; 'information': 0.63; 'name': 0.63; 'kind': 0.63; 'received:194': 0.64; 'to:addr:gmail.com': 0.65; 'here': 0.66; 'notice:': 0.67; 'person,': 0.68; 'privileged.': 0.69; 'disclose': 0.74; 'medium.': 0.91 |
| X-IronPort-AV | E=Sophos;i="4.95,494,1384297200"; d="scan'208";a="2245280" |
| X-Virus-Scanned | amavisd-new at zimbra.sequans.com |
| Date | Mon, 16 Dec 2013 13:05:41 +0100 (CET) |
| From | Jean-Michel Pichavant <jeanmichel@sequans.com> |
| To | Jean Dubois <jeandubois314@gmail.com>, python-list@python.org |
| In-Reply-To | <aabaa0e5-7f13-47c8-b81c-6b9a9e3785de@googlegroups.com> |
| Subject | Re: [newbie] trying socket as a replacement for nc |
| MIME-Version | 1.0 |
| X-Mailer | Zimbra 7.2.4_GA_2900 (ZimbraWebClient - GC31 (Win)/7.2.4_GA_2900) |
| Content-Type | text/plain; charset="utf-8" |
| Content-Transfer-Encoding | base64 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4209.1387195543.18130.python-list@python.org> (permalink) |
| Lines | 17 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1387195543 news.xs4all.nl 2941 [2001:888:2000:d::a6]:45434 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:62053 |
Show key headers only | View raw
> Here is the code:
> #!/usr/bin/env python
> import telnetlib
> host = '10.128.59.63'
> port = 7000
> t = Telnet(host, port)
> t.write('*IDN?\n')
> print t.read_until('Whateverprompt')
> # you can use read_very_eager also
>
> and this is the result of executing the code(from which I deduce I
> have to
> install telnetlib, but how?)
> Traceback (most recent call last):
> File "./nctelnet.py", line 5, in <module>
> t = Telnet(host, port)
> NameError: name 'Telnet' is not defined
>
> kind regards,
> jean
t = telnetlib.Telnet(host, port)
JM
-- 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.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [newbie] trying socket as a replacement for nc Jean-Michel Pichavant <jeanmichel@sequans.com> - 2013-12-16 13:05 +0100 Re: [newbie] trying socket as a replacement for nc Jean Dubois <jeandubois314@gmail.com> - 2013-12-16 05:38 -0800
csiph-web