From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ac8:4d9a:0:b0:39c:d479:b1d9 with SMTP id a26-20020ac84d9a000000b0039cd479b1d9mr613299qtw.612.1668162358052; Fri, 11 Nov 2022 02:25:58 -0800 (PST) X-Received: by 2002:a05:6214:4002:b0:4bb:f798:fbc5 with SMTP id kd2-20020a056214400200b004bbf798fbc5mr1369163qvb.0.1668162357828; Fri, 11 Nov 2022 02:25:57 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 11 Nov 2022 02:25:57 -0800 (PST) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=152.249.156.27; posting-account=TRgI1QoAAABSsYi-ox3Pi6N-JEKKU0cu NNTP-Posting-Host: 152.249.156.27 References: <7d578e15-d21e-4eae-a519-d98c1bf1145cn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <673c0ad1-dd6d-4cc6-a191-3bcff7f1c5ddn@googlegroups.com> Subject: Re: Running Python code from GPRBuild (Calling from GNAT Studio) From: "Rego, P." Injection-Date: Fri, 11 Nov 2022 10:25:58 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2498 Xref: reader01.eternal-september.org comp.lang.ada:64598 List-Id: Hi Dmitry, > Python is not a compiled language. Indeed. It will not generate an object like any compiled language. But Since Python is included in Languages list from Project properties, I expected that the IDE were capable of statically checking the syntax and pointed the "compilation" errors. Also, I expected that we could run the script from GPS, and be able to debug it. > 1. If you want to create a Python module in a form of a dynamically > linked library, you must use C or Ada for that. Not the case, I also don't see advantages of it (so I agree, I'd go directly to Ada or C). > 2. If you rather meant pre-compiled binary code (*.pyc). Python creates > them by py_compile command. See > https://docs.python.org/3/library/py_compile.html#py_compile.compile > There is also command-line interface: > https://docs.python.org/3/library/compileall.html > You possibly could configure gpr to call compileall on *.py files, > though it would make no sense to me. I think this would be the closer of what I was trying to do. The idea is to help in the development. Instead of having to develop the Python part from a separate IDE, being able to code in the same would speed up things. Would you have some example of it? (how to configure gpr to call compileall on *.py files). Thanks!