#1 Option to specify "end of line" for expect

closed
nobody
None
5
2006-06-01
2004-08-18
Anonymous
No

Background:
Trying to use pexpect to drive rsync
I would like to use the "--progress" option in rsync to
get updated progress information, but rsync does not
put a linefeed during updates to the progress. It only
uses "^M" and overwrites the previous output.

I would like expect to treat "^M" as a logical end of
line so I can catch the updating progess indicator.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Nevermind! I had a mistake in my regex.

     
  • Noah Spurrier

    Noah Spurrier - 2006-06-01

    Logged In: YES
    user_id=59261

    You can use a timeout (see pexpect.run()) or just match
    for ^m. For example:
    child.expect ('\r')

     
  • Noah Spurrier

    Noah Spurrier - 2006-06-01
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks