Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #96125
| Path | csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeder.erje.net!1.eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail |
|---|---|
| Return-Path | <lac@openend.se> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'string.': 0.04; 'cc:addr :python-list': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'str,': 0.09; 'subject:while': 0.09; 'sys.stdout': 0.09; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'skip:> 20': 0.16; 'subject:issue': 0.16; 'subject:ssh': 0.16; 'bytes': 0.18; 'laura': 0.18; '2015': 0.20; 'cc:addr:python.org': 0.20; 'cc:2**1': 0.22; 'sep': 0.22; 'error': 0.27; '-0700,': 0.29; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'url:mailman': 0.30; 'url:python': 0.33; 'url:listinfo': 0.34; 'tue,': 0.34; 'follows:': 0.35; 'skip:> 10': 0.35; 'unicode': 0.35; 'url:org': 0.36; 'subject:: ': 0.37; 'missing': 0.37; 'charset:us-ascii': 0.37; 'url:en': 0.39; 'url:mail': 0.40; 'where': 0.40; 'header :Message-Id:1': 0.61; 'email addr:gmail.com': 0.62; 'header:In- reply-to:1': 0.84; 'subject:doing': 0.84; 'url:api': 0.84; 'url:readthedocs': 0.84; 'url:latest': 0.91 |
| To | harirammanohar159@gmail.com |
| cc | python-list@python.org, lac@openend.se |
| From | Laura Creighton <lac@openend.se> |
| Subject | Re: issue while doing pexpect ssh |
| In-reply-to | <3f4642c2-d548-4089-87c2-f3abb4ccb224@googlegroups.com> |
| References | <3f4642c2-d548-4089-87c2-f3abb4ccb224@googlegroups.com> |
| Comments | In-reply-to harirammanohar159@gmail.com message dated "Tue, 08 Sep 2015 04:37:09 -0700." |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="us-ascii" |
| Content-ID | <30927.1441714347.1@fido> |
| Content-Transfer-Encoding | quoted-printable |
| Date | Tue, 08 Sep 2015 14:12:27 +0200 |
| X-Greylist | Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Tue, 08 Sep 2015 14:12:30 +0200 (CEST) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| 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.220.1441714357.8327.python-list@python.org> (permalink) |
| Lines | 26 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1441714357 news.xs4all.nl 23791 [2001:888:2000:d::a6]:58835 |
| X-Complaints-To | abuse@xs4all.nl |
| X-Received-Bytes | 3691 |
| X-Received-Body-CRC | 131814475 |
| Xref | csiph.com comp.lang.python:96125 |
Show key headers only | View raw
In a message of Tue, 08 Sep 2015 04:37:09 -0700, harirammanohar159@gmail.com wr
ites:
>Some where i am missing simple logic.... :)
>
>=====
>child = pexpect.spawn('ssh hari@hostname')
>child.logfile = sys.stdout
>child.expect('hari\'s Password: ')
>=====
>
>getting error as follows:
>============
>child.expect('hari\'s Password: ')
>TypeError: must be str, not bytes
>===========
>
>Thanks...
>--
>https://mail.python.org/mailman/listinfo/python-list
https://pexpect.readthedocs.org/en/latest/api/pexpect.html#run-function
you want to use spawnu because you have a unicode string.
Laura
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-08 04:37 -0700
Re: issue while doing pexpect ssh Laura Creighton <lac@openend.se> - 2015-09-08 14:12 +0200
Re: issue while doing pexpect ssh Chris Angelico <rosuav@gmail.com> - 2015-09-08 23:57 +1000
Re: issue while doing pexpect ssh jmp <jeanmichel@sequans.com> - 2015-09-08 16:56 +0200
Re: issue while doing pexpect ssh Laura Creighton <lac@openend.se> - 2015-09-08 18:43 +0200
Re: issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-09 01:58 -0700
Re: issue while doing pexpect ssh Laura Creighton <lac@openend.se> - 2015-09-09 12:45 +0200
Re: issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-09 02:19 -0700
Re: issue while doing pexpect ssh Laura Creighton <lac@openend.se> - 2015-09-09 12:47 +0200
Re: issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-09 04:22 -0700
Re: issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-09 22:18 -0700
Re: issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-09 23:08 -0700
csiph-web