[Pythonmac-SIG] Jack Jansen - Question on Python Launcher

Barry Scott barry at barrys-emacs.org
Wed Jun 2 14:26:58 EDT 2021



> On 30 May 2021, at 18:30, Guy DeStefano <guydestefano at gmail.com> wrote:
> 
> 
> Sorry to bother you, but I have one question that I cannot find an answer to, could you please help.  Am very new to Python3 and have written a small program that is my base for my learning Python3.  All is perfect except,  when I double click my program the .py file, it works great except that it calls in the Python Launcher, and when I exit my program, the preferences box for Python Launcher and the Icon of the launcher still remain on the screen.  I have to manually close the python launcher.  Can this be done programmatically, I exit with sys.exit(0). I am using tkinter in the program, along with python3.9.5, on an Apple Mac computer.  This may not be the proper place for this question, if not, I apologize and please direct me where to go as I have been googling for days. Thanks in advance. Any help will be greatly appreciated.
> I have just noticed that python3 -V states python 3.9.5, and looking at the python launcher box it states Version 3.10.0b1(3.10.0b1) Is this something I am doing wrong.

I cannot duplicate what you are doing.

I have Xcode installed so when I  double click a .py file it ends up in the Xcode editor.

Unless you have written a GUI app then your python program is expecting to be run from a Terminal window.

I'm guessing what what you are seeing is that the python launcher is running your program and keeping the window
open so that you can read what it printed.

Often new users complain that the Window flash and vanishes before they can read the output.
This behaviours looks to be the solution to that common problem.

Barry

> 
> guydestefano at gmail.com <mailto:guydestefano at gmail.com>
> Guy DeStefano
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> https://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/pythonmac-sig/attachments/20210602/024d8d72/attachment.html>


More information about the Pythonmac-SIG mailing list