~ubuntu-branches/ubuntu/natty/pytrainer/natty-proposed

« back to all changes in this revision

Viewing changes to extensions/wordpress/googlemaps.py

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-02-04 06:07:11 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100204060711-25n5aw66w5egeiph
Tags: 1.7.1-1ubuntu1
* Merge from debian testing, remaining changes:
  - debian/control:
    + Replace Depends on iceweasel with firefox | abrowser.
    + Bump python-dev,debhelper build-dependencies.
    - Drop dependency on python-glade2 (libglade -> gtkbuilder transition).
  - debian/rules:
    + Append --install-laoyut=deb to setup.py install to prevent a build
      failure with Python 2.6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
import re
21
21
import sys
22
 
sys.path.insert(0,os.path.join(sys.path[0],'../../pytrainer/lib'))
23
 
from gpx import Gpx
24
 
import points as Points 
25
 
from  fileUtils import fileUtils
26
22
import fileinput
 
23
import shutil
 
24
 
 
25
import pytrainer.lib.points as Points
 
26
from pytrainer.lib.gpx import Gpx
 
27
from  pytrainer.lib.fileUtils import fileUtils
 
28
 
27
29
        
28
30
def drawMap(gpxfile,key,htmlpath):
 
31
        #Not sure why need to process gpx file
29
32
        cachefile = "/tmp/gpx.txt"
30
 
        trackdistance = 100
31
 
        os.system("gpsbabel -t -i gpx -f %s -x position,distance=%sm -o gpx -F %s" %(gpxfile,trackdistance,cachefile))
 
33
        #trackdistance = 100
 
34
        #os.system("gpsbabel -t -i gpx -f %s -x position,distance=%sm -o gpx -F %s" %(gpxfile,trackdistance,cachefile))
 
35
        shutil.copy2(gpxfile, cachefile)
32
36
 
33
37
        # Test if file already contains gpxdata attribute
34
38
        found = False