/usr/share/doc/condor/examples/dmtcp/foo.py is in condor-doc 7.8.2~dfsg.1-1+deb7u3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 26 27 28 29 30 31 32 33 34 | #!/usr/bin/env python
# Python analog to foo.c
import sys
import time
min_delay = 10
runtime = int(sys.argv[1])
if runtime < min_delay:
print 'Delay has a minimum of', min_delay, 'seconds'
runtime = min_delay
outfile = open(sys.argv[2], 'w')
print 'Dumping stdin:'
outfile.write('Dumping stdin:\n')
for line in sys.stdin:
print 'stdin: %s' % line,
outfile.write('stdin: %s' % line)
print 'Doing work for', runtime, 'seconds'
outfile.write('Doing work for %i seconds\n' % runtime)
for t in xrange(runtime):
print 'i = %i' % t
outfile.write('i = %i\n' % t)
time.sleep(1)
print 'Done.'
outfile.write('Done.\n')
sys.exit(0);
|