view src/testdir/test_channel_write.py @ 27199:d4f254d02d7c v8.2.4128

patch 8.2.4128: crash when method cannot be found Commit: https://github.com/vim/vim/commit/64283d5e1f5487e2dbaa17d478e6eae040daa064 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 18 10:37:29 2022 +0000 patch 8.2.4128: crash when method cannot be found Problem: Crash when method cannot be found. (Christian J. Robinson) Solution: Don't mix up pointer names.
author Bram Moolenaar <Bram@vim.org>
date Tue, 18 Jan 2022 11:45:04 +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