Path: csiph.com!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'session.': 0.07; 'subject:How': 0.09; '"\\n")': 0.09; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:after': 0.16; 'subject:object': 0.16; 'url:home': 0.18; '2015': 0.20; 'sep': 0.22; 'header:X-Complaints-To:1': 0.26; 'device': 0.28; 'indentation': 0.29; 'termination': 0.29; '-0700': 0.33; 'info': 0.34; 'subject:use': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us- ascii': 0.37; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'email addr:gmail.com': 0.62; 'here': 0.66; '>def': 0.84; 'here...': 0.84; 'dennis': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: How to use the returned telnet object after creating the telnet session. Date: Sun, 13 Sep 2015 12:40:17 -0400 Organization: IISS Elusive Unicorn References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-68-178-61.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442162427 news.xs4all.nl 23825 [2001:888:2000:d::a6]:40881 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96511 On Sun, 13 Sep 2015 00:38:03 -0700 (PDT), manjunatha.mahalingappa@gmail.com declaimed the following: > connection.write(cmd + "\n") > Here you added a termination newline. > >#Function to read device IP and port . and this info for opening the telnet session. >def IP_port(file): >T = [] >F = open(file,'r') >F.seek(0) > Indentation wrong? > T1.write("show config") <<<<<<<<