accessmod/grasshelper.py
def find_grass_dir():
    """Try to find GRASS install directory."""
    if "GISBASE" in os.environ:
        return os.environ["GISBASE"]
    p = subprocess.run(["grass", "--config", "path"], capture_output=True)
    if p.returncode == 0:
        return p.stdout.decode().strip()
    else:
        raise GrassNotFoundError()
Try to find GRASS install directory.
Try to find GRASS install directory.
Try to find GRASS install directory .
def find_grass_dir():
    if "GISBASE" in os.environ:
        return os.environ["GISBASE"]
    p = subprocess.run(["grass", "--config", "path"], capture_output=True)
    if p.returncode == 0:
        return p.stdout.decode().strip()
    else:
        raise GrassNotFoundError()
def find_grass_dir ( ) : if "GISBASE" in os . environ : return os . environ [ "GISBASE" ] p = subprocess . run ( [ "grass" , "--config" , "path" ] , capture_output = True ) if p . returncode == 0 : return p . stdout . decode ( ) . strip ( ) else : raise GrassNotFoundError ( )
Try to find GRASS install directory.
Try to find GRASS install directory .
"""Try to find GRASS install directory."""