view src/testdir/test_channel_write.py @ 25595:c4e29355cd8b v8.2.3334

patch 8.2.3334: Vim9: not enough tests run with Vim9 Commit: https://github.com/vim/vim/commit/bd77aa92744d79f3ba69aee713739ec17da474f6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 12 17:06:05 2021 +0200 patch 8.2.3334: Vim9: not enough tests run with Vim9 Problem: Vim9: not enough tests run with Vim9. Solution: Run a few more tests in Vim9 script and :def function. Fix islocked(). Fix error for locking local variable.
author Bram Moolenaar <Bram@vim.org>
date Thu, 12 Aug 2021 17:15: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