view src/testdir/test_channel_write.py @ 22846:83c2c489cb1b v8.2.1970

patch 8.2.1970: it is easy to make mistakes when cleaning up swap files Commit: https://github.com/vim/vim/commit/f883508e36c209d60388b944e04e22a3fcf603cf Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 9 21:04:17 2020 +0100 patch 8.2.1970: it is easy to make mistakes when cleaning up swap files Problem: It is easy to make mistakes when cleaning up swap files after the system crashed. Solution: Warn for the process still running after recovery. Do not automatically delete a swap file created on another system. (David Fries, closes #7273)
author Bram Moolenaar <Bram@vim.org>
date Mon, 09 Nov 2020 21: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