JasperVanDenBosch / fexpect

extension for fabric to handle prompts through pexpect
http://ilogue.com/jasper/blog/fexpect--dealing-with-prompts-in-fabric-with-pexpect/
BSD 2-Clause "Simplified" License
44 stars 13 forks source link

======= fexpect

Fexpect is an extension to fabric for handling prompts with pexpect scripts.

Provisional documentation in these blogposts:

Please report bugs, request features at the github repository: http://github.com/ilogue/fexpect

Seems it doesn't work well with easy_install, please install with pip.

usage

::

from ilogue.fexpect import expect, expecting, run

prompts = []
prompts += expect('What is your name?','Jasper')
prompts += expect('Where do you live?','Frankfurt')

with expecting(prompts):
    run('command')

You can use the included fabfile.py to run the fexpect tests:

::

fab test -p 'yourlocalpassword'

Note however that the tests may have different requirements (more recent fabric version). You can install these with the traditional:

::

python setup.py test

contributors