The script will generate multiple files using the year and id variable. These files need to be placed into a folder matching year and id. How do I write them to the correct folders?
file_root_name = row["file_root_name"]
year = row["year"]
id = row["id"]
path = year+'-'+id
try:
os.makedirs(path)
except:
pass
output = open(row['file_root_name']+'.smil', 'w')
output.write(prettify(doctype, root))
os.path.join? Is that what you're struggling with?yearandidvariable. These files need to be placed into a folder matchingyearandid.os.path.join. Are you asking how to useos.path.join?