Manually, one can export an XY Event Source to a shapefile by right-clicking on it, then selecting Data>Export Data. How would I automate this using Python? There doesn't seem to be a tool for this.
Have you tried Copy Features?
You can just convert the table source to a Feature Class with da.NumpyArrayToFeatureClass
from numpy import genfromtxt
csvFile = r'myfile.csv'
dfarr = genfromtxt(csvFile,delimiter=',')
arrayToConvert = numpy.array(dfarr, numpy.dtype([('X', '<f8'),('Y', '<f8')]))
output = 'H:\Documents\Default.gdb\NumpyToFC'
arcpy.da.NumPyArrayToFeatureClass(arrayToConvert, output, ("X", "Y"))
Retrieving data ...