pexpect module

Lee Harr missive at frontiernet.net
Sun May 16 10:47:11 EDT 2004


On 2004-05-14, Gianluca Trombetta <gianluca.trombetta at tin.it> wrote:
> Someone know pexpect module?
> I've a problem working with it...
>
> I need to run some commands on remote hosts, like ls, df -k etc..All right.
> Although, when i launch a command that have a "more" inside, i don't know
> what i must expect!
> An example:
>
> if i want to run an "ls -l | more" on a remote host, it don't return me a
> prompt, but a "-------------More-------------"...thus i don't know how much
> this.
>


The only reason I can see for piping the command through more would
be if there were a person sitting there wanting to read the output
before going on to read the next page of output.  That seems counter
to the idea of using pexpect to automate the process. Do you
really need to pipe through more?




More information about the Python-list mailing list