view src/testdir/test_channel_write.py @ 15404:440e5071f3f8 v8.1.0710

patch 8.1.0710: when using timers may wait for job exit quite long commit https://github.com/vim/vim/commit/c46af534102c65b43912311d67f55f5049e5ef7a Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 9 22:24:49 2019 +0100 patch 8.1.0710: when using timers may wait for job exit quite long Problem: When using timers may wait for job exit quite long. Solution: Return from ui_wait_for_chars_or_timer() when a job or channel needs to be handled. (Ozaki Kiichi, closes #3783)
author Bram Moolenaar <Bram@vim.org>
date Wed, 09 Jan 2019 22:30:06 +0100
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