[Gdal-dev] import _gdal issue

Christopher Schmidt crschmidt at metacarta.com
Tue Oct 9 18:33:43 EDT 2007


On Wed, Oct 10, 2007 at 10:22:25AM +1300, Simon Hope wrote:
> >>> import _gdal
> 
> And don't get any errors and have access to the members on that module.

Pythonwin is probably using a different PYTHONPATH than apache is.
Somewhere in that path _gdal is probably included. Others can probably
comment more directly, but I would do something like:

import _gdal
print _gdal

Which should give output like <module 'gdal' from
'C:\SomethingOrOther\gdal.dll'> or something similar.

Once you've done that, you should be able to add the following to the
FeatureServer cgi:

sys.path.append("C:\SomethingOrOther")

after the 'import sys' and before the 'import FeatureServer' lines.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Gdal-dev mailing list