Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

python: add function to test for available plugins #246

Closed
artemp opened this Issue · 2 comments

1 participant

Artem Pavlenko
Artem Pavlenko
Owner

would be great to be able to do something like:

from mapnik import *
PluginEngine.has('gdal')
or
if 'gdal' in Plugins() # where we can fetch a list or dict...

Artem Pavlenko
Owner

[springmeyer] pushing to 0.7.0 since it is an enhancement

Artem Pavlenko
Owner

[springmeyer] added in r1180

std::vector don't perform as nicely as true python lists, but work well enough for this:

{{{
#!python

from mapnik import DatasourceCache as c
'gdal' in c.plugin_names()
True
for p in c.plugin_names():
... print p
...
gdal
kismet
ogr
osm
postgis
raster
shape
sqlite
}}}

Artem Pavlenko artemp closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.