blob: 4abe887f1f6cfc005f7c04a1177a8041dee6e051 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/env python3
import sys
import atexit
import time
sys.stdout.write('foo stdout\n')
sys.stderr.write('foo stderr\n')
print(repr(sys.argv))
sys.stdout.flush()
sys.stderr.flush()
def x():
sys.stdout.write('Exiting (stdout)\n')
sys.stdout.flush()
sys.stderr.write('Exiting (stderr)\n')
sys.stderr.flush()
atexit.register(x)
while True:
time.sleep(1)
# vim: expandtab tabstop=4 shiftwidth=4
|