Changeset 12465
- Timestamp:
- 10/17/07 16:44:56 (1 year ago)
- Files:
-
- trunk/gdal/swig/include/python/gdal_python.i (modified) (2 diffs)
- trunk/gdal/swig/python/gdal.py (modified) (1 diff)
- trunk/gdal/swig/python/gdalconst.py (modified) (1 diff)
- trunk/gdal/swig/python/gdalnumeric.py (modified) (1 diff)
- trunk/gdal/swig/python/ogr.py (modified) (1 diff)
- trunk/gdal/swig/python/osgeo/gdal.py (modified) (2 diffs)
- trunk/gdal/swig/python/osr.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gdal/swig/include/python/gdal_python.i
r11517 r12465 19 19 import gdalconst 20 20 21 21 22 import sys 23 have_warned = 0 22 24 byteorders = {"little": "<", 23 25 "big": ">"} … … 32 34 gdalconst.GDT_Byte: ("%st8" % byteorders[sys.byteorder]), 33 35 } 36 37 38 def deprecation_warn( module ): 39 global have_warned 40 41 if have_warned == 1: 42 return 43 44 have_warned = 1 45 46 from warnings import warn 47 warn('%s.py was placed in a namespace, it is now available as osgeo.%s' % (module,module), 48 DeprecationWarning) 49 34 50 %} 35 51 trunk/gdal/swig/python/gdal.py
r12455 r12465 1 1 # import osgeo.gdal as a convenience 2 from osgeo.gdal import deprecation_warn 3 deprecation_warn('gdal') 4 2 5 from osgeo.gdal import * 3 4 Debug("Deprecation Warning", 'gdal.py was placed in a namespace, it is now available as osgeo.gdal')trunk/gdal/swig/python/gdalconst.py
r12450 r12465 1 1 # import osgeo.gdalconst as a convenience 2 from osgeo.gdal import deprecation_warn 3 deprecation_warn('gdalconst') 4 2 5 from osgeo.gdalconst import * 3 from osgeo import gdal4 5 gdal.Debug("Deprecation Warning", 'gdalconst.py was placed in a namespace, it is now available as osgeo.gdalconst')trunk/gdal/swig/python/gdalnumeric.py
r12450 r12465 1 1 # import osgeo.gdal_array as a convenience 2 from osgeo.gdal import deprecation_warn 3 deprecation_warn('gdalnumeric') 4 2 5 from osgeo.gdal_array import * 3 from osgeo import gdal4 5 gdal.Debug("Deprecation Warning", 'gdalnumeric.py was placed in a namespace, it is now available as osgeo.gdal_array')trunk/gdal/swig/python/ogr.py
r12450 r12465 1 1 # import osgeo.ogr as a convenience 2 from osgeo.gdal import deprecation_warn 3 deprecation_warn('ogr') 4 2 5 from osgeo.ogr import * 3 from osgeo import gdal4 5 gdal.Debug("Deprecation Warning", 'ogr.py was placed in a namespace, it is now available as osgeo.ogr')trunk/gdal/swig/python/osgeo/gdal.py
r12278 r12465 52 52 import gdalconst 53 53 54 54 55 import sys 56 have_warned = 0 55 57 byteorders = {"little": "<", 56 58 "big": ">"} … … 65 67 gdalconst.GDT_Byte: ("%st8" % byteorders[sys.byteorder]), 66 68 } 69 70 71 def deprecation_warn( module ): 72 global have_warned 73 74 if have_warned == 1: 75 return 76 77 have_warned = 1 78 79 from warnings import warn 80 warn('%s.py was placed in a namespace, it is now available as osgeo.%s' % (module,module), 81 DeprecationWarning) 82 67 83 68 84 trunk/gdal/swig/python/osr.py
r12450 r12465 1 1 # import osgeo.osr as a convenience 2 from osgeo.gdal import deprecation_warn 3 deprecation_warn('osr') 4 2 5 from osgeo.osr import * 3 from osgeo import gdal4 5 gdal.Debug("Deprecation Warning", 'osr.py was placed in a namespace, it is now available as osgeo.osr')
