Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 7d924ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
17 changes: 4 additions & 13 deletions python/plugins/GdalTools/GdalTools.py
Expand Up @@ -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 ", "" )
Expand Down
13 changes: 1 addition & 12 deletions python/plugins/GdalTools/tools/doAbout.py
Expand Up @@ -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):

Expand Down

0 comments on commit 7d924ed

Please sign in to comment.