[gdal-dev] Python 1.6 bindings under Windows

Frank Warmerdam warmerdam at pobox.com
Tue Jul 28 11:10:00 EDT 2009


Markus Reinhold wrote:
> Hej again,
> thank you for the suggestions.
> 
>> Normally this is accomplished as a side effect of running gdal16.bat to
>> switch to the GDAL 1.6 environment.  If you look at 
>> osgeo4w\bin\gdal16.bat
>> you will see it does:
>>
>>   SET PYTHONPATH=%OSGEO4W_ROOT%\apps\gdal-16\pymod;%PYTHONPATH%
>>
> 
> As a matter of fact I have run gdal16.bat before, however the changes 
> were only in effect within the shell of OSGeo4W. So to make the switch 
> permanent one would have to set and/or change the environment variables 
> used in the batch for the whole system accordingly?

Markus,

OSGeo4W is setup so that the python stuff works either from the shell
or from the apache environment.  It is not really intended to be
"system wide".  For instance, the OSGeo4W python can coexist with other
system python versions as long as you don't mix things.

If you want to use OSGeo4W Python stuff at the system level you are
mostly on your own.   But if your system python is a compatible version
you should be able to just set the PYTHONPATH at the system level similarly
to how OSGeo4W (and gdal16.bat) set it.

>> The gdal.VersionInfo() function returns the version using 
>> GDALVersionInfo().
> 
> I'm pretty sure I had searched gdal.py for some sort of version property 
> but at that time to no avail. Turns out I haven't looked thoroughly 
> enough... Sorry to bother you.

no problem.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list