[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2021-11-01 Thread Ned Deily


Change by Ned Deily :


--
type: crash -> behavior
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-07-16 Thread wyz23x2


Change by wyz23x2 :


--
type:  -> crash

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-15 Thread Werner

Werner  added the comment:

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.hin...@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 :
>
> Ned Deily  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 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-15 Thread Ned Deily


Ned Deily  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-15 Thread Glenn Travis


Glenn Travis  added the comment:

Is there no way to edit a previous comment?
Anyway, I can get it to work as described, but the Launcher Preferences window 
also opens when I run a script.  Did I miss a setting?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis


Glenn Travis  added the comment:

It is working now. However, I end up with two terminal windows open.
One is the one that I opened and the second appears to have been opened by the 
Launcher??

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis


Glenn Travis  added the comment:

Thank you Ned.

So close now.  After your final fix, if I understood you correctly, we will no 
longer have to open Terminal? 

And, excuse my vast knowledge gap, but will it ever be possible to not have the 
terminal run in the future?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Ned Deily


Ned Deily  added the comment:

Glenn, you will need to change the Interpreter setting in the Launcher 
Preferences panel.  In the box that says "/usr/bin/pythonw", type 
"/usr/local/bin/python3"; that setting will then be remembered on subsequent 
launches.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis


Glenn Travis  added the comment:

Well heck.
I just tried it, and got an error.  The error does not occur when I run the 
script directly from the Terminal, nor when I run it via IDLE (double click)

Last login: Thu May 14 07:57:11 on ttys000
But what do I know? % cd '/Volumes/BigHDD/Ortho4XP-master/' && 
'/usr/bin/pythonw'  '/Volumes/BigHDD/Ortho4XP-master/Ortho4XP_v130.py'  && echo 
Exit status: $? && exit 1
Traceback (most recent call last):
  File "/Volumes/BigHDD/Ortho4XP-master/Ortho4XP_v130.py", line 9, in 
import O4_Imagery_Utils as IMG
  File "./src/O4_Imagery_Utils.py", line 597
SyntaxError: Non-ASCII character '\xc2' in file ./src/O4_Imagery_Utils.py on 
line 597, but no encoding declared; see http://python.org/dev/peps/pep-0263/ 
for details
But what do I know? %

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis


Glenn Travis  added the comment:

I appreciate the update.
As an aside, I keep the terminal in the dock.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Ned Deily


Ned Deily  added the comment:

An update on this: it turns out there are two different problems with the 
launcher app as a result of security changes introduced in macOS 10.15 Catalina.

The first is that the launcher did not execute files launched with it (for 
example, by double-clicking on the source file or by dragging the file to the 
launcher icon).  The launcher launches but no Terminal window opens.  That 
problem has been fixed in the just released python.org macOS installer for 
3.8.3 and will be fixed in the next releases of 3.7.x and 3.9.x (pre-release).

The second problem is that the launcher app is not able to launch Terminal.app 
to run the script if Terminal.app was not already running. Unfortunately, I was 
not able to provide a fix for that problem in time for 3.8.3. However, there is 
a relatively easy workaround until that fix is available. Before using the 
launcher app, just ensure that Terminal.app is already launched; the launcher 
will then be able to run any number of scripts in new terminal windows as 
expected.  One easy standard way to launch Terminal.app is to invoke Spotlight 
by clicking on the "magnifying glass" icon near the upper right end of the 
macOS menu bar and then typing the letters "terminal" followed by the Return 
key in the resulting search window.  When a script is done running, just close 
the terminal window but don't quit Terminal.app if you want to keep using the 
launcher.

--
priority: normal -> high
stage:  -> needs patch
title: Launcher on Catalina -> Python Launcher app on macOS 10.15 Catalina 
fails to run scripts
versions: +Python 3.7, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com