I have some shapefiles, which I want to display in Python.

Is there any code for that?

closed as unclear what you're asking by PolyGeo, Fezter, Curlew, underdark Aug 17 '14 at 11:36

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


There are several libraries that can achieve this. If you want a pure python-solution ( no wrappers for C-code ..) use pyshape but be aware that it "just" reads and writes shapefiles.

However, Joel Lawhead, the author of pyshape, also shows examples of displaying shapefiles in his book "Learning Geospatial Analysis with Python" (packt), e.g. using the pngcanavas library

Also take a look at the blog post entitled Essential Python Geospatial Libraries which gives you a good overview of geospatial python libraries (not just shapefiles).

  • It needs you to do the deletes - there's a little cross at right of each. I hope you do not mind me making a tidy up edit to your answer before I upvote it. – PolyGeo Aug 17 '14 at 10:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.