I have obtained a desired value from a dataset using:
ogrinfo input.shp -dialect SQLite -sql "SELECT SUM(field) from input
The ogrinfo command prints the desired value via the command line when I run this in a python script. I need to write out this result to a .txt or .csv file as my intention is to display it in a barplot, ideally using plotly.
Other relevant info:
Windows 7, Python 3.3
GDAL 1.11