Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19027

Re: Problem while doing a cat on a tabbed file with pexpect

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Problem while doing a cat on a tabbed file with pexpect
Date 2012-01-15 22:35 -0500
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.4784.1326684966.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, 15 Jan 2012 16:11:27 -0800 (PST), Saqib Ali
<saqib.ali.75@gmail.com> 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.
>
	Ah... Now we are outside of my experience... And into the realms of
how your remote host is handling tab characters when sent to an
(apparent) console (stdout not redirected to a file)... That is, does it
expand \t into spaces on the next multiple of 8 characters, or some
other size, rather than issue the tab character itself. 

	Is it an actual file on the remote end, or the output from some
interactive session? If an actual file, can you find an alternate
command to transfer the file to a local path for file processing (ftp,
scp, ?).
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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