浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Improved Fexpect now on pypi

Improved Fexpect now on pypi

Saturday 07 April 2012

I got nice feedback on fexpect from some users. Michael Ivanov wrote that he uses fexpect for end-to-end testing of the localwiki Ubuntu packages on EC2 instances. He suggested to dynamically link pexpect. His fix has now been integrated in the new fexpect github repository. The code now feels mature enough and has been published on pypi, so you can now easily install it with your favourite python package manager;

pip install fexpect
easy_install fexpect

or list it as a requirement in you fabric project. To import the newly packaged version:

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')

Enjoy!

Comments? Write me an email or discuss on facebook, google+ or twitter.

posted on 2012-05-08 15:10  lexus  阅读(343)  评论(0编辑  收藏  举报