diff options
author | Lionel <lionel.miquel46@gmail.com> | 2018-10-31 12:20:09 +0100 |
---|---|---|
committer | Lionel <lionel.miquel46@gmail.com> | 2018-10-31 12:20:09 +0100 |
commit | 6f8af4d10fa7e0d4a7bd4a6e5c958527e8cd5ed7 (patch) | |
tree | 580db1d39ca84a9a75163082c004bea80903f15a /prototyping/mapsparsing.py | |
parent | 687df02d8a8711342d9061b60d06266cc01b0c35 (diff) | |
download | randopitons-6f8af4d10fa7e0d4a7bd4a6e5c958527e8cd5ed7.tar.gz randopitons-6f8af4d10fa7e0d4a7bd4a6e5c958527e8cd5ed7.zip |
Cleaning up the repo
Diffstat (limited to 'prototyping/mapsparsing.py')
-rw-r--r-- | prototyping/mapsparsing.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/prototyping/mapsparsing.py b/prototyping/mapsparsing.py deleted file mode 100644 index 6caa37a..0000000 --- a/prototyping/mapsparsing.py +++ /dev/null @@ -1,27 +0,0 @@ -import xml.etree.ElementTree as xmlp -import re -import errmsg as reeee -import os -def mapparsing(maptype,basicfilename): - try: - tree=xmlp.parse(basicfilename) - root=tree.getroot() - if maptype==1: - filename=root[1][0].text+".gpx" - elif maptype==2: - thefile=open(basicfilename) - for i in range(3): - thefile.readline() - filename=re.findall(r'\|(.*?)\|', thefile.readline())[0]+".trk" - elif maptype==3: - filename= root[0][10][1][0].text+".kml" - os.rename(basicfilename,filename) - except OSError, e: - print reeee.os - except xmlp.ParseError, er: - print reeee.formaterr - print format(er) - os.remove(basicfilename) - pass - - |