# write the script to a temporary file
f = open(filename, 'w')
f.write(script % locals())
f.close()
# make the file executeable
chmod_cmd = "/bin/chmod 775 %(filename)s" % locals()
# write the script to a temporary file
f = open(filename, 'w')
f.write(script % locals())
f.close()
# make the file executeable
chmod_cmd = "/bin/chmod 775 %(filename)s" % locals()