Opened 11 years ago

Last modified 11 years ago

#5194 closed defect

update autotests to new style imports — at Version 1

Reported by: Kurt Schwehr Owned by: Kurt Schwehr
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: minor Keywords:
Cc:

Description (last modified by Kurt Schwehr)

Minor cleanup - update the imports in the autotest python files from:

import gdal
import ogr
import osr

to

from osgeo import gdal
from osgeo import ogr
from osgeo import osr

This pretty much does that:

find autotest -name \*.py  | xargs -n 1 perl -pi -e "s|^import ogr$|from osgeo import ogr|"
find autotest -name \*.py  | xargs -n 1 perl -pi -e "s|^import osr$|from osgeo import osr|"
find autotest -name \*.py  | xargs -n 1 perl -pi -e "s|^import gdal$|from osgeo import gdal|"

Change History (1)

comment:1 by Kurt Schwehr, 11 years ago

Description: modified (diff)
Owner: changed from warmerdam to Kurt Schwehr
Note: See TracTickets for help on using tickets.