António Rocha wrote: > My question is, when I'm running a GRASS python Script what is my active > folder in order to place there my Parameter file? Or, is there any way > to change my "active folder" while I'm running GRASS python Script?
By "active folder", I presume that you're referring to the current directory (aka working directory, current working directory or CWD). This is inherited from the calling process; e.g. if you run a script from a shell, the script's current directory will be the shell's current directory. When executing a command via subprocess.Popen(), you can specify its current directory via the cwd= parameter. The grass.Popen() and grass.call() functions accept this parameter, as do all of the grass.*_command() functions for running GRASS modules. You can change the current directory for the current process using os.chdir(), but that should normally be avoided, as any relative filenames will then be interpreted relative to the new current directory, whereas the user probably intended them to be relative to the initial current directory. -- Glynn Clements <gl...@gclements.plus.com> _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user