katrin eggert wrote:

> Everytime I try to run a Python Script in Windows, when I need to insert a
> file path (e.g. D:\testing_ground) I need to change the \ for /.

In what context?

In Python string literals, the "\" character is used as an escape
character, e.g. "\n" is newline. You need to use "\\" for a literal
backslash, or use raw string literals, e.g.

        "C:\\Program Files\\GRASS\\..."
or:
        r"C:\Program Files\GRASS\..."

If you're running GRASS commands from a bash shell, bash also uses
backslash as an escape character. The solutions are similar (use a
double backslash or place single quotes around the string), or you can
use cmd.exe instead of bash.

If the issue is elsewhere, you'll need to explain more clearly.

-- 
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to