view src/testdir/test_channel_write.py @ 24156:a358fa462560 v8.2.2619

patch 8.2.2619: Vim9: no test for return type of lambda Commit: https://github.com/vim/vim/commit/5f91e74bf968c9033474086b2d9cb457281c8aa6 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 17 21:29:29 2021 +0100 patch 8.2.2619: Vim9: no test for return type of lambda Problem: Vim9: no test for return type of lambda. Solution: Add a test.
author Bram Moolenaar <Bram@vim.org>
date Wed, 17 Mar 2021 21:30:02 +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