replace input() with raw_input() in Python 2.x interpreter
ignore IOError from a pager correctly

IOError have not been raised in `p.wait()', but in `p.stdin.write(...)'.