view src/testdir/test_channel_write.py @ 19950:9cbe3a4f1492 v8.2.0531

patch 8.2.0531: various errors not tested Commit: https://github.com/vim/vim/commit/476a613135bdc94e61c1dce8a9cbb4ab0b6dc2d1 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 8 19:48:56 2020 +0200 patch 8.2.0531: various errors not tested Problem: Various errors not tested. Solution: Add tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5895)
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Apr 2020 20:00:04 +0200
parents 5cd9ba96561d
children
line wrap: on
line source

#!/usr/bin/python
#
# Program that writes a number to stdout repeatedly
#
# This requires Python 2.6 or later.

from __future__ import print_function
import sys
import time

if __name__ == "__main__":

    done = 0
    while done < 10:
        done = done + 1
        print(done)
        sys.stdout.flush()
        time.sleep(0.05)  # sleep 50 msec