[GRASS-dev] Handling of Python scripts on MS Windows
Glynn Clements
glynn at gclements.plus.com
Thu Jan 30 16:13:14 PST 2014
Benjamin Ducke wrote:
> >>> "Executing" a script uses the registry associations for the script's
> >>> extension.
> >>
>
> This matters for using os.system("python.exe <script>") from within
> a Python script, right?
No. It matters for using e.g. os.system("/path/to/script.py") from a
Python script. Or system("/path/to/script.py") from a C program. Or
just "script.py" from a .bat file. Or any other situation where you
"execute" a script without specifying the interpreter explicitly.
On Unix, the #! line at the start of the script is used to determine
the interpreter. On Windows, the extension is used to look up the
interpreter in the registry.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list