Skip to content
Permalink
Browse files
import the modules without use the path
git-svn-id: http://svn.osgeo.org/qgis/trunk@13684 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Jun 7, 2010
1 parent f77f232 commit 7d924eda6139319e8425574f34501c0d2a0c109e
Showing with 5 additions and 25 deletions.
  1. +4 −13 python/plugins/GdalTools/GdalTools.py
  2. +1 −12 python/plugins/GdalTools/tools/doAbout.py
@@ -29,20 +29,11 @@
req_mods = { "osgeo": "osgeo [python-gdal]" }

try:
# Set up current path, so that we know where to look for modules
import os.path, sys
currentPath = os.path.dirname( __file__ )
modulesPath = os.path.abspath( currentPath + '/tools' )
sys.path.append( modulesPath )

import GdalTools_utils as Utils

import doBuildVRT, doContour, doRasterize, doPolygonize, doMerge, doSieve, doProximity, doNearBlack
import doWarp, doGrid, doTranslate, doClipper, doInfo, doProjection, doOverview, doRgbPct, doPctRgb
import doSettings, doAbout

sys.path.remove( modulesPath )
from tools import GdalTools_utils as Utils

from tools import ( doBuildVRT, doContour, doRasterize, doPolygonize, doMerge, doSieve, doProximity, doNearBlack )
from tools import ( doWarp, doGrid, doTranslate, doClipper, doInfo, doProjection, doOverview, doRgbPct, doPctRgb )
from tools import ( doSettings, doAbout )
except ImportError, e:
error_str = str(e)
error_mod = error_str.replace( "No module named ", "" )
@@ -6,18 +6,7 @@
from qgis.gui import *

from ui_dialogAbout import Ui_GdalToolsAboutDialog as Ui_Dialog

# Set up current path, so that we know where to look for version
import os.path, sys
currentPath = os.path.dirname( __file__ )
pluginPath = os.path.abspath( currentPath + "/.." )
sys.path.append( pluginPath )

# prepended the module name, to avoid conflicts with other __init__ modules in search path
from GdalTools.__init__ import version

sys.path.remove( pluginPath )

from GdalTools import version

class GdalToolsAboutDialog(QDialog, Ui_Dialog):

0 comments on commit 7d924ed

Please sign in to comment.