#!/usr/bin/env python import datetime import math import os import sys import time sys.stdout.write(datetime.datetime.now().strftime('Starting %Y %d %b %H:%M:%S\n')) sys.stdout.write('The input file I was given contains: %s\n' % sys.stdin.readlines() ) sys.stdout.write('Starting intensive simulation of the collision of intergalactic forces in the outer cosmos!\n') x = float(sys.argv[1]) for i in range(0, 5): time.sleep(1) y = math.sqrt(x) sys.stdout.write("x = "+str(y)+"\n") x = y os.system("echo Ran on host `hostname --fqdn`"); sys.stdout.write(datetime.datetime.now().strftime('Finished %Y %d %b %H:%M:%S\n'))