view src/testdir/test_channel_write.py @ 27611:e311a80f8cbe v8.2.4332

patch 8.2.4332: Vim9: incomplete test for existing script variable in block Commit: https://github.com/vim/vim/commit/dce2441a603f2c9343a4a46091283a32420d80a2 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 8 20:35:30 2022 +0000 patch 8.2.4332: Vim9: incomplete test for existing script variable in block Problem: Vim9: incomplete test for existing script variable in block. Solution: Add a couple more tests. Fix uncovered problem.
author Bram Moolenaar <Bram@vim.org>
date Tue, 08 Feb 2022 21:45:03 +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