Message369009
I believe, I found a simple way to get what you are looking for:
Open Automator and create an app.
Select »execute Shell script«
put in the editor: python3 $1
Save this as MyPythonLauncher or what you want. Test it: Drop a Python script on the app. It should execute without opening the Terminal (at least if it is a GUI-script).
If this is not clear, write me on we.hintze@gmail.com
--
Werner Hintze • Auerstraße 1 • 10249 Berlin
Tel.: +49 30 42 73 486 • Mobil: +49 160 94 68 76 60
Am 16. Mai 2020, 06:58 +0200 schrieb Ned Deily <report@bugs.python.org>:
>
> Ned Deily <nad@python.org> added the comment:
>
> > After your final fix, if I understood you correctly, we will no longer have to open Terminal?
>
> That's correct. That's the way the Launcher works on previous version on macOS.
>
> > will it ever be possible to not have the terminal run in the future?
>
> That's the way the Launcher works. It's a very simple-minded application. Essentially all it does for you is to provide an easy way from the Finder to run a Python script in a terminal window, i.e. by double-clicking or by drag-and-drop. Like on other Unix-based systems, Python on macOS is typically used as a command line program that runs under a Unix shell in a terminal window of some sort. Python itself does not provide a macOS GUI application interface; that is something that IDLE does (and other third-party IDEs that support Python). The Launcher app dates back to the very earliest days of Mac OS X when Python for Classic MacOS (System 9) was ported over. The Launcher is not really used very much as far as I can tell and its age shows with some usability and even security concerns. If you are comfortable using a terminal window and a Unix shell, you may find it more convenient to just run scripts directly there rather than indirectly using the Launcher, e.g.
>
> $ cd Documents # or whatever Folder
> $ python3.8 your_script.py
>
> Or, to open Python in interactive mode, where you can enter statements and immediately see the results:
>
> $ python3.8
>
> If you prefer a full-featured dev environment, you can use IDLE.
>
> > Is there no way to edit a previous comment?
>
> On the current bugs.python.org, no, sorry!
>
> > the Launcher Preferences window also opens when I run a script. Did I miss a setting?
>
> As far as I know, opening Preferences is a "feature" of the Launcher and can't be prevented.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue40477>
> _______________________________________ |
|
Date |
User |
Action |
Args |
2020-05-16 05:14:01 | Auerhahn | set | recipients:
+ Auerhahn, ronaldoussoren, ned.deily, TotallyLost |
2020-05-16 05:14:01 | Auerhahn | link | issue40477 messages |
2020-05-16 05:14:00 | Auerhahn | create | |
|