original_docstring: Create a new location/mapset
docstring: Create a new location/mapset
docstring_tokens: Create a new location / mapset
code: def grass_create(grassbin, path, create_opts):
      """Create a new location/mapset"""
      cmd = '{grassbin} -c "{create_opts}" -e {path}'.format(
          grassbin=grassbin, create_opts=create_opts, path=path
          )
      proc = subprocess.Popen(
          cmd,
          shell=True,
          env=ORIGINAL_ENV,
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
          )
      out, err = proc.communicate()
      if proc.returncode != 0:
          raise RuntimeError(
              "Cannot create: {path} with the following "
              "options: {create_opts}. Executing:\n{cmd}\n"
              "GRASS said:\n"
              "{out}\n{err}".format(
                  path=path, create_opts=create_opts, cmd=cmd, out=out, err=err
                  )
              )
code_tokens: def grass_create ( grassbin , path , create_opts ) : cmd = '{grassbin} -c "{create_opts}" -e {path}' . format ( grassbin = grassbin , create_opts = create_opts , path = path ) proc = subprocess . Popen ( cmd , shell = True , env = ORIGINAL_ENV , stdout = subprocess . PIPE , stderr = subprocess . PIPE , ) out , err = proc . communicate ( ) if proc . returncode != 0 : raise RuntimeError ( "Cannot create: {path} with the following " "options: {create_opts}. Executing:\n{cmd}\n" "GRASS said:\n" "{out}\n{err}" . format ( path = path , create_opts = create_opts , cmd = cmd , out = out , err = err ) )
short_docstring: Create a new location/mapset
short_docstring_tokens: Create a new location / mapset
comment: """Create a new location/mapset"""