[GRASS-dev] winGRASS: PATHEXT question

Martin Landa landa.martin at gmail.com
Sun Dec 4 17:53:48 EST 2011


2011/12/4 Glynn Clements <glynn at gclements.plus.com>:
>> > I have checked $PATHEXT which contains beside EXE
>> > also PY extension.
>> > The problem is that sh.exe ignores PATHEXT, right?
>> I'm pretty sure that is correct, PATHEXT is only
>> recognized by DOS & cmd.exe
> Right. But note that "cmd.exe" doesn't just mean running cmd.exe
> interactively in a console window, but also C's system() and popen(),
> Python's subprocess.Popen(), Windows' ShellExecute(), etc.
> If the .py extension is removed, bash will still recognise it as a
> script via the shebang, but native Windows APIs won't be able to
> execute it.

I was thinking rather to "hide" the extensions, similarly to
exe-files. In other words, when you type in console window


the python script `r.buffer.py` will be launched. The user doesn't
care if the module is an exe-file or python-script. Probably BAT
script could help(?)


Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

More information about the grass-dev mailing list