I am trying to find a least cost path script for Python.

I came across r.drain from GRASS GIS.

Is it possible to use GRASS GIS in a Python standalone script?

If so where can I download the bindings?

2 Answers 2


Yes, and there are more resources available now (besides the one listed by gene):

API for Python are part of GRASS itself, so you just have to install GRASS GIS but note that GRASS does not add its packages to the system Python nor messes with it in any way (to be on the safe side). Similarly the GRASS executable does not not have to be on PATH, although it typically is in Linux distributions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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