view src/testdir/test_channel_write.py @ 30998:10aa54743543 v9.0.0834

patch 9.0.0834: warning for missing return type Commit: https://github.com/vim/vim/commit/f8ea10677d007befbb6f24cd20f35c3bf71c1296 Author: Sam James <sam@gentoo.org> Date: Sat Nov 5 15:13:50 2022 +0000 patch 9.0.0834: warning for missing return type Problem: Warning for missing return type. Solution: Add "int". (San James, closes https://github.com/vim/vim/issues/11496)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Nov 2022 16:15: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