Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (14 sloc) 822 Bytes
import csv, os, pprint
# STEP 5 of lacrashbot script package
#This file creates a python script (called containing an AT scheduled event for each crash.
#Once is created, you need to edit it and paste this into the top of it:
#import subprocess
#after pasting, remove the # from "#import subprocess" but don't remove it from "#!/usr/bin/python"
test_file = './LACinjury2014_Narrate.csv'
csv_file = csv.DictReader(open(test_file, 'rb'), delimiter=',')
with open('', 'w') as csvoutput:
for line in csv_file:
event = "print subprocess.Popen('echo python | at " + line['COLLISION_TIME'] + " " + line['COLLISION_DATE'] + "', shell=True, stdout=subprocess.PIPE) \n"