On Fri, Jul 25, 2014 at 1:29 PM, Chad Ferguson <[email protected]>
wrote:

> sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "python",
> "grass", "script"))
>
> import grass.script as grass
>

Since the import is `import grass` or similar, you have to add the
directory containing `grass` directory, i.e.:

sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "python"))

By the way, my personal opinion is that

import grass.script as grass

is a bad practice and should be avoided in a new code, the alternative is
not standardized but

import grass.script as gscript

should do.

Vaclav
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to