Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'foss': 0.09; 'password)': 0.09; 'suggestions.': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '2.7': 0.14; 'question.': 0.14; '2.7.3': 0.16; 'after,': 0.16; 'eof,': 0.16; 'exist.': 0.16; 'help;': 0.16; 'is;': 0.16; 'presume': 0.16; 'send()': 0.16; 'send,': 0.16; 'wrote:': 0.18; 'example': 0.22; 'import': 0.22; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'sends': 0.24; 'cheers,': 0.24; 'looks': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'appear': 0.29; '----': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'gives': 0.31; 'initiate': 0.31; 'file': 0.32; 'open': 0.33; 'linux': 0.33; 'url:python': 0.33; 'running': 0.33; 'problem': 0.35; 'skip:s 30': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'located': 0.36; 'data,': 0.36; 'interact': 0.36; 'url:listinfo': 0.36; 'entry': 0.36; 'method': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'remote': 0.38; 'window': 0.38; 'issue': 0.38; 'skip:- 10': 0.38; 'pm,': 0.38; 'does': 0.39; 'environment.': 0.39; 'use.': 0.39; 'system.': 0.39; 'url:mail': 0.40; 'how': 0.40; 'tell': 0.60; 'field.': 0.61; 'simple': 0.61; 'address': 0.63; 'information': 0.63; 'field': 0.63; 'response.': 0.68; 'spawned': 0.84; 'opens': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=DRpVudErXN3vUScX+M8gJRtRh5gqtRfSegnlxGq4u5w=; b=d/IuqS7tBxPuWxb01PJFQ6rV7knIWcmarTEl+Wtn6fU3+0DK0KcWdGxDWEmLJs3Vnm WzsuDfNc1XSk5+Kw2jaQ4MGE3ZQ5k7Mhyy9eXRWgzUnn1GuJ5Q2rMjw7mbk1bzWDj93o YTyNCcwo6KmqhKqD4xRKkxcnqrP/YmD+VdcsiUjx//PzB/ZI9M8tWyCBvF4NnaiTAkdb UiED9P/XILIcFTJluTHar4TxHbWVy+ZjtTUhMZ3VbHz7sjqG5vsyqQjQjIAfehzkjd/d 2bjG20JkR7g+U/SKCKaozNF+jq95MXwIJyqEuofezKEoenKXGETpI9K4uVTfO4rnN1dC jF9A== X-Received: by 10.180.183.43 with SMTP id ej11mr1456096wic.9.1375863066434; Wed, 07 Aug 2013 01:11:06 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <3630058.GVOTG9cGGT@mach-114-20> References: <4559802.M7tbXMqQd4@mach-114-20> <3630058.GVOTG9cGGT@mach-114-20> From: "Lakshmipathi.G" Date: Wed, 7 Aug 2013 13:40:46 +0530 Subject: Re: pexpect, loading an entry field To: inq1ltd Content-Type: text/plain; charset=ISO-8859-1 X-Mailman-Approved-At: Wed, 07 Aug 2013 10:12:49 +0200 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 136 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375863171 news.xs4all.nl 15899 [2001:888:2000:d::a6]:57605 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52117 Hi - I'm using Python 2.7.3 (Fedora 17) . I tried a simple example with pexpect to copy a file to remote system. It works $ cat pex.py import pexpect s = pexpect.spawn ('scp pex.py root@10.30.77.244:/tmp') s.expect ('Password:') s.sendline ('a') s.expect(pexpect.EOF,timeout=20) Execute above program (change remote ip and password) - If it works then its not an issue with pexpect or python environment. -- ---- Cheers, Lakshmipathi.G FOSS Programmer. www.giis.co.in On Tue, Aug 6, 2013 at 11:33 PM, inq1ltd wrote: > > >> pexpect looks simple to use. Please check this example > >> >> http://www.pythonforbeginners.com/systems-programming/how-to-use-the-pexpect > >> -module-in-python/ > >> > python help; > >> > > >> > I am using pexpect to open my program. > >> > Can someone tell me how to get data to appear in > >> > an entry field. > >> > After pexpect opens the my program I have tried to use > >> > send, sendline, and write functions to try to put data into > >> > the program's entry field. > >> > However, the data is going to the terminal window, > >> > the window that is used to initiate the call to pexpect > >> > but not to the entry field in the open program. > >> > I would appreciate suggestions. > >> > > >> > jol > >> > > > > > Thanks for the response. > > > > I have been there but that site gives me > > the same information that I get from > > noah.org. I have the pexpect docs and they presume > > that this problem doesn't exist. > > > > None of the information in the NOAH site or the FAQ's > > address this question. > > > > I'm using suse linux running python 2.7 and pexpect. > > > > The data, when using send() method is going to the terminal window, > > This is the same window that is used to initiate the call to pexpect. > > > > Pexpect opens the program but the send method sends > > data to the terminal window, not the entry field located > > in the child spawned by pexpect. > > > > interact works, as does close(), TIMEOUT, EOF, before, after, > > expect_exact and methods. But the entry field does not > > load. > > > > So my question is; > > > > Why?? > > > > > > > > > >> > > >> > > >> > > >> > -- > >> > http://mail.python.org/mailman/listinfo/python-list