view src/testdir/test_channel_write.py @ 27571:55f0ac079829 v8.2.4312

patch 8.2.4312: no error for using :vim9script in a :def function Commit: https://github.com/vim/vim/commit/107f7325f615a1ffa5b49521e316b44e117b0a04 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 6 17:30:41 2022 +0000 patch 8.2.4312: no error for using :vim9script in a :def function Problem: No error for using :vim9script in a :def function. Solution: Give an error when compiling.
author Bram Moolenaar <Bram@vim.org>
date Sun, 06 Feb 2022 18: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