Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19028
| Date | 2012-01-15 20:47 -0700 |
|---|---|
| From | Michael Torrie <torriem@gmail.com> |
| Subject | Re: Problem while doing a cat on a tabbed file with pexpect |
| References | <d33374b9-de51-4cfa-b05d-0bb13fdf79f3@f11g2000yql.googlegroups.com> <mailman.4778.1326655502.27778.python-list@python.org> <4008c5d1-98c5-4796-9e82-0e8835fbe42a@i25g2000vbt.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4785.1326685659.27778.python-list@python.org> (permalink) |
On 01/15/2012 05:11 PM, Saqib Ali wrote:
>
> Very good question. Let me explain why I'm not opening me.txt directly
> in python with open.
>
> The example I have posted is simplified for illustrative purpose. In
> reality, I'm not doing pexpect.spawn("/bin/tcsh"). I'm doing
> pexpect.spawn("ssh myuser@ipaddress"). Since I'm operating on a remote
> system, I can't simply open the file in my own python context.
There is a very nice python module called "paramiko" that you could use
to, from python, programatically ssh to the remote system and cat the
file (bypassing any shells) or use sftp to access it. Either way you
don't need to use pexpect with it.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Problem while doing a cat on a tabbed file with pexpect Saqib Ali <saqib.ali.75@gmail.com> - 2012-01-15 09:51 -0800
Re: Problem while doing a cat on a tabbed file with pexpect Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-01-15 14:24 -0500
Re: Problem while doing a cat on a tabbed file with pexpect Saqib Ali <saqib.ali.75@gmail.com> - 2012-01-15 16:11 -0800
Re: Problem while doing a cat on a tabbed file with pexpect Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-01-15 22:35 -0500
Re: Problem while doing a cat on a tabbed file with pexpect Michael Torrie <torriem@gmail.com> - 2012-01-15 20:47 -0700
Re: Problem while doing a cat on a tabbed file with pexpect Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-15 23:04 +0000
Re: Problem while doing a cat on a tabbed file with pexpect Cameron Simpson <cs@zip.com.au> - 2012-01-16 10:40 +1100
Re: Problem while doing a cat on a tabbed file with pexpect Saqib Ali <saqib.ali.75@gmail.com> - 2012-01-15 16:14 -0800
Re: Problem while doing a cat on a tabbed file with pexpect Cameron Simpson <cs@zip.com.au> - 2012-01-16 12:45 +1100
Re: Problem while doing a cat on a tabbed file with pexpect Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-16 02:01 +0000
csiph-web