Talleta tämä nimellä gpxtest.py
from xml.etree import ElementTree
import urllib2,string,sys
def teesaika(aika):
	a=string.rsplit(aika,"-",3)
	a2=string.rsplit(a[2],"T",2)
	saika=a2[0]+"."+a[1]+"."+a[0]+" "+string.rsplit(string.replace(a2[1],"Z",""),".")[0];
	return saika
files=urllib2.urlopen('file:'+sys.argv[1])
gpxs = ElementTree.parse(files).getroot()
trkseg=gpxs.find("{http://www.topografix.com/GPX/1/1}trk/{http://www.topografix.com/GPX/1/1}trkseg")
for item in trkseg.findall("{http://www.topografix.com/GPX/1/1}trkpt"):
	s=""
	s=s+ string.replace(item.attrib['lat'],".",",")
	s=s+ ";"
	s=s+ string.replace(item.attrib['lon'],".",",")
	s=s+ ";"
	s=s+ string.replace(item.find("{http://www.topografix.com/GPX/1/1}ele").text,".",",")
	s=s+ ";"
	s=s+ teesaika(item.find("{http://www.topografix.com/GPX/1/1}time").text)
	s=s+ ";"
	s=s+ item.find("{http://www.topografix.com/GPX/1/1}sat").text
	s=s+ ";"
	s=s+ string.replace(item.find("{http://www.topografix.com/GPX/1/1}speed").text,".",",")
	print s 
s=s+ "</table></body></html>";
Käyttö:
python gpxtest.py gpxdataa.gpx >gpxdataa.csv
Edit - jossa siis gpxdataa.gpx on .gpx-tiedostosi nimi ja gpxdataa.csv on ohjelman luoma tiedosto.
Avatessasi käytä erottimena ';'
ja päivämäärän kohdalla joudut merkkaamaan koko sarakkeen muodoksi PKV:ksi, jotta käsittelee aikana.