[GRASS-dev] scripts don't launch GUI from the msys command line in winGRASS

#### first issue

So far, I've only seen this in Vista and am wondering if anyone else has seen it. Using the nightly build from 2 February.

From the command line, type the name of a script, like r.blend, without arguments
Instead of the GUI popping up, there is an error complaining about the lack of arguments.

It's like g.parser is not being invoked.

### second issue

Also, copy a script and rename the copy (e.g., copy r.blend to r.blend2), leaving it in the scripts folder, then copy the script's *.bat file (in bin), rename the copy (e.g., , e.g., r.blend.bat to r.bend2.bat), and edit the *.bat file so that it points to the proper renamed script copy (e.g., now points to r.blend2). Type the script's name on the msys command line and press return.

There is an error that the script cannot be found.

Any thoughts?

I'm trying to help some students learn scripting. It is frustrating that even correctly written scripts don't work.

Michael

Michael Barton wrote:

#### first issue

So far, I've only seen this in Vista and am wondering if anyone else has
seen it. Using the nightly build from 2 February.

From the command line, type the name of a script, like r.blend,
without arguments
Instead of the GUI popping up, there is an error complaining about the
lack of arguments.

What error, exactly?

### second issue

Also, copy a script and rename the copy (e.g., copy r.blend to
r.blend2), leaving it in the scripts folder, then copy the script's
*.bat file (in bin), rename the copy (e.g., , e.g., r.blend.bat to
r.bend2.bat), and edit the *.bat file so that it points to the proper
renamed script copy (e.g., now points to r.blend2). Type the script's
name on the msys command line and press return.

There is an error that the script cannot be found.

What error, exactly?

--
Glynn Clements <glynn@gclements.plus.com>

Michael wrote:

#### first issue

So far, I've only seen this in Vista and am wondering if
anyone else has seen it. Using the nightly build from 2
February.

From the command line, type the name of a script, like
r.blend, without arguments
Instead of the GUI popping up, there is an error
complaining about the lack of arguments.

it's funny that we all noticed this at the same time, but actually it
is all modules and it's been like that for a long time (if not always).
I had tried a WinGrass installer from December (well before the latest
rounds of argv[0] and G_spawn() changes) and it was the same. --ui is
needed from the msys prompt.

I tried from the DOS prompt as well (even setting GRASS_GUI=wxpython),
but that just returns you to the C:\> prompt. You can start g.gui from
there ok though. shrug.

### second issue

Also, copy a script and rename the copy (e.g., copy
r.blend to r.blend2), leaving it in the scripts folder, then
copy the script's *.bat file (in bin), rename the copy
(e.g., , e.g., r.blend.bat to r.bend2.bat), and edit the
*.bat file so that it points to the proper renamed script
copy (e.g., now points to r.blend2). Type the script's name
on the msys command line and press return.

There is an error that the script cannot be found.

Any thoughts?

.. perhaps restart GRASS? ?

I'm trying to help some students learn scripting. It is
frustrating that even correctly written scripts don't work.

understood.

Hamish

On Feb 4, 2010, at 11:55 PM, Hamish wrote:

Michael wrote:

#### first issue

So far, I've only seen this in Vista and am wondering if
anyone else has seen it. Using the nightly build from 2
February.

From the command line, type the name of a script, like
r.blend, without arguments
Instead of the GUI popping up, there is an error
complaining about the lack of arguments.

it's funny that we all noticed this at the same time, but actually it
is all modules and it's been like that for a long time (if not always).
I had tried a WinGrass installer from December (well before the latest
rounds of argv[0] and G_spawn() changes) and it was the same. --ui is
needed from the msys prompt.

I tried from the DOS prompt as well (even setting GRASS_GUI=wxpython),
but that just returns you to the C:\> prompt. You can start g.gui from
there ok though. shrug.

Odd. I guess it's that we don't use Windows regularly enough to spot this kind of thing. It underscores the need for more
Windows testers.

### second issue

Also, copy a script and rename the copy (e.g., copy
r.blend to r.blend2), leaving it in the scripts folder, then
copy the script's *.bat file (in bin), rename the copy
(e.g., , e.g., r.blend.bat to r.bend2.bat), and edit the
*.bat file so that it points to the proper renamed script
copy (e.g., now points to r.blend2). Type the script's name
on the msys command line and press return.

There is an error that the script cannot be found.

Any thoughts?

.. perhaps restart GRASS? ?

I'll suggest it.

I'm trying to help some students learn scripting. It is
frustrating that even correctly written scripts don't work.

understood.

If we can get the Python thing worked out I keep hoping that this will all improve a lot.

MIchael

Hamish wrote:

I had tried a WinGrass installer from December (well before the latest
rounds of argv[0] and G_spawn() changes) and it was the same. --ui is
needed from the msys prompt.

I tried from the DOS prompt as well (even setting GRASS_GUI=wxpython),
but that just returns you to the C:\> prompt. You can start g.gui from
there ok though. shrug.

It works for me with GRASS_GUI=wxpython (for recent versions of 6.4; I
think that you'll need r40717 if there are spaces in $GISBASE).

> ### second issue
>
> Also, copy a script and rename the copy (e.g., copy
> r.blend to r.blend2), leaving it in the scripts folder, then
> copy the script's *.bat file (in bin), rename the copy
> (e.g., , e.g., r.blend.bat to r.bend2.bat), and edit the
> *.bat file so that it points to the proper renamed script
> copy (e.g., now points to r.blend2). Type the script's name
> on the msys command line and press return.
>
> There is an error that the script cannot be found.
>
> Any thoughts?

.. perhaps restart GRASS? ?

In bash, try the "hash" command, e.g. "hash -r".

--
Glynn Clements <glynn@gclements.plus.com>