[GRASS-dev] Handling of Python scripts on MS Windows
Glynn Clements
glynn at gclements.plus.com
Thu Mar 6 01:08:35 PST 2014
Markus Metz wrote:
> > .py is supposed to be associated with a Python interpreter, and
> > the stock Python installer will do that.
>
> .py is not supposed to be associated with a Python interpreter that is
> installed system-wide
It certainly is, because that's what the stock Python installer will
do by default.
> because this assumes some kind of package
> manager as available on Linux/BSD/Unix. MS Windows does not have a
> package manager. Any software installed on Windows must include any
> script interpreters and enforce the use of these for the respective
> scripts.
>
> The fundamental assumption of MS Windows software installers is that
> no other software installer will interfere with its installation. This
> assumption is violated as soon as a software installer invokes another
> software installer. This means that the WinGRASS software installer
> should not invoke or require a Python installation on MS Windows.
All of this goes out the window if you want to provide a command-line
environment, whether an interactive shell or the ability to execute
commands via system() or CreateProcess().
The only way that you can "configure" Windows' command execution
mechanism is by registering extensions.
> Instead of battling the MS Windows software management system,
But that's exactly what trying to "bundle" Python is doing. You don't
trust the OS to be configured correctly so you're trying to construct
an isolated sandbox.
> I would
> rather follow the approach of other projects that have been running
> successfully on MS Windows with their embedded python interpreter for
> a couple of years.
You're referring to monolithic applications which require that any
"scripting" is done from within the application itself. They typically
also require the use of a specific language for scripting, and have
entirely separate mechanisms for extension via scripts and extension
via compiled code (the latter typically being in the form of DLL
"plug-ins").
IOW, the exact opposite of GRASS.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list