From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Running Python code from GPRBuild (Calling from GNAT Studio)
Date: Fri, 11 Nov 2022 20:50:10 +0100 [thread overview]
Message-ID: <tkm91g$t7f$1@gioia.aioe.org> (raw)
In-Reply-To: fb9e0383-9daa-453d-9968-a19ade60dc5fn@googlegroups.com
On 2022-11-11 19:08, Rego, P. wrote:
>> It should show syntax errors. If you remove -m py_compile switches, then
>> it will "compile" and execute.
>
> Got some error when removed -m switch
> C:\GNAT\2021\libexec\gnatstudio\gnathub\share\gnathub\python\python.exe: can't open file 'compileall': [Errno 2] No such file or directory
Because it is one of these three:
1. for Required_Switches ("Python") use ("-m", "py_compile");
2. for Required_Switches ("Python") use ("-m", "compileall");
3. nothing
#1 results in
python.exe -m py_compile <file>
= compile only. py_compile is the module name that takes <file> as an
argument.
#2 results in
python.exe -m compileall <file>
= compile, generate *.pyc files, store them at the Python library
location. compileall is the module name.
#3 results in
python.exe <file>
= compile/run <file>.
When you remove -m but leave compileall you get
python.exe compileall <file>
and compileall is treated as a file.
Command line-arguments are here:
https://docs.python.org/3/using/cmdline.html
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2022-11-11 19:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 19:25 Running Python code from GPRBuild (Calling from GNAT Studio) Rego, P.
2022-11-10 21:57 ` Dmitry A. Kazakov
2022-11-11 10:25 ` Rego, P.
2022-11-11 11:04 ` Dmitry A. Kazakov
2022-11-11 11:28 ` Rego, P.
2022-11-11 13:30 ` Dmitry A. Kazakov
2022-11-11 13:40 ` Dmitry A. Kazakov
2022-11-11 18:12 ` Rego, P.
2022-11-11 18:08 ` Rego, P.
2022-11-11 19:50 ` Dmitry A. Kazakov [this message]
2022-11-11 21:34 ` Rego, P.
2022-11-11 15:20 ` Egil H H
2022-11-11 18:14 ` Rego, P.
2022-11-11 20:05 ` Egil H H
2022-11-11 21:24 ` Rego, P.
2022-11-12 17:40 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox